Running java program
-
- Profound User
- Posts: 91
- Joined: Fri Aug 03, 2012 11:07 am
- First Name: Paul
- Last Name: Ramcharitar
- Company Name: Banks DIH
- City: Georgetown
- Zip / Postal Code: 592
- Country: Guyana
- Contact:
Running java program
Hi, I would like to run a java program (jar file) located on the IFS from profoundui. I was able to run the program on my PC using profoundui's "runPCCommand()" function.
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Running java program
I'm not sure I understand what you mean.
You say you can run it on your PC with runPCCommand(). That sounds like it's working... so, what is it that's not working?
Did you want to run it from your RPG program? (If so, please remember that your RPG programs are using IBM's ILE RPG compiler... So there's no difference between running your Java program from an RPG progam that uses PUI than there is from any other RPG program.)
Or, is this Java code a web application... would you like to open it in a browser?
Or, is it an applet that should run in the browser?
Or, something else that I'm not thinking of?
You say you can run it on your PC with runPCCommand(). That sounds like it's working... so, what is it that's not working?
Did you want to run it from your RPG program? (If so, please remember that your RPG programs are using IBM's ILE RPG compiler... So there's no difference between running your Java program from an RPG progam that uses PUI than there is from any other RPG program.)
Or, is this Java code a web application... would you like to open it in a browser?
Or, is it an applet that should run in the browser?
Or, something else that I'm not thinking of?
-
- Profound User
- Posts: 91
- Joined: Fri Aug 03, 2012 11:07 am
- First Name: Paul
- Last Name: Ramcharitar
- Company Name: Banks DIH
- City: Georgetown
- Zip / Postal Code: 592
- Country: Guyana
- Contact:
Re: Running java program
Okay, I would like to save my compiled JAR file on the IFS, and have it run from there. I am also passing parameters to the program.
I was able to run it from my PC using:
It was running from the IFS using:
But this method does not work any more. It does not find the jar file.
I am aware that I can run it from my RPG program, but I was hoping I could run it from PUI.
I was able to run it from my PC using:
Code: Select all
runPCCommand("cmd /c java -jar c:/dist/JavaPrint.jar 1 2 " +get(locInfoID));
Code: Select all
runPCCommand("cmd /c java -jar \\\\192.xxx.x.x\\disapps\\java\\dist\\JavaPrint.jar 1 2 " +get(locInfoID));
But this method does not work any more. It does not find the jar file.
I am aware that I can run it from my RPG program, but I was hoping I could run it from PUI.
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Running java program
There was a problem with runPCCommand from versions 4.6.4 to 4.6.6. This causes errors when running runPCCommand -- an error message will pop up, and the command will not be run. This was fixed with Profound UI version 4.6.7.
However, the problem would not be that Windows cannot find the JAR file, it would be an error with running any PC command. Could that be the error you're receiving?
If the problem is truly that the command is running and Windows cannot find the JAR file, then this is not an issue with PUI, it's an issue with how your PCs locate files on the network...
However, the problem would not be that Windows cannot find the JAR file, it would be an error with running any PC command. Could that be the error you're receiving?
If the problem is truly that the command is running and Windows cannot find the JAR file, then this is not an issue with PUI, it's an issue with how your PCs locate files on the network...
-
- Profound User
- Posts: 91
- Joined: Fri Aug 03, 2012 11:07 am
- First Name: Paul
- Last Name: Ramcharitar
- Company Name: Banks DIH
- City: Georgetown
- Zip / Postal Code: 592
- Country: Guyana
- Contact:
Re: Running java program
I didn't get a pop up error while using runPCCommand, so it must be a problem locating the file on the network. I will look into it.
Thanks scott
Thanks scott
Who is online
Users browsing this forum: Ahrefs [Bot] and 1 guest