Customer is getting the following error when trying to run java commands on their iSeries:
qsh: 001-0019 Error found searching for command java. No such path or directory.
They are running V5R3 and we verified that they have Java 1.4 SDK loaded via GO LICPGM, option 10.
Why is the java command not found ?
For some reason the java command would not run even though a link to it was found in the /usr/bin IFS folder which is where unix style QSHELL commands are run from. /usr/bin was also in the user's search path. We determined this by running STRQSH and then typing env and pressing enter.
Something similar to the following was listed when env was run. Notice the path line:
The only thing we could figure was that the symbolic link in '''/usr/bin''' for the java command was messed up. This could be because the customer upgraded from an earlier OS/400 release to V5R3 instead of installing a clean version of OS/400.
The following changes resolved the problem and now the java command is found:
Renamed existing '/usr/bin/java' to java.sav
rnm obj('/usr/bin/java') newobj(java.sav)
Created a new object link to the JDK V1.4 version of the java command
addlnk obj('/qibm/prodddata/java400/jdk14/bin/java) newlnk('/usr/bin/java')
Testing to make sure the java command is found
From OS/400 command line type: '''STRQSH''' and press enter.
When the QSHELL command display is shown, type '''java''' and press Enter.
If you see a list of java options, then the java command is now found.
You can also type '''java -version''' to make sure the version is 1.4.x