Open Source team coded a series of Java .jar apps that I have placed in IFS in root/JAVA_HOME folder.
I need guidance on how to create a CLASSPATH to the IFS folder so my CLP can call the JAVA app. Do I define the CLASSPATH in the CLP or set up WRKENVVAR?
Is there a better solution for placing the JAVA applications in IFS?
Software/Hardware used:
ASKED:
December 15, 2009 4:37 PM
UPDATED:
December 18, 2009 3:53 AM
It depends on what you’re doing.
I need guidance on how to create a CLASSPATH to the IFS folder so my CLP can call the JAVA app.
Are you intending to use the JAVA command from CL? If so, then you might want to study the JAVA CLASSPATH() parm, particularly its (help) text.
Or are you intending to access java via Qshell scripts (or perhaps in the QzshSystem API)? You might set a CLASSPATH environment variable or you might supply the value to the script in any of the many ways a script can receive values.
I’m no java programmer. I mostly only know that there are options. The one that works for you will probably depend on just what is being done.
Tom
The intent is to call the java program from the CLP passing parms which the java program will use to insert data into a table then create a HASH key from the linkage data.
Then the java program will call a different CLP passing in a URL with the hash tacked on to the end. The second CLP then will open the URL and a validation routine takes place before opening the URL against the HASH key.
I was experimenting and setting up the environment in the CLP with a call to the Java program but it reuturns a Java exit code 1. From what I have read it says to use QSHELL to call the java program in a more natural environment and see what the true issue is. Need guidance on how to call this in QSHELL passing the required linkage.
Here is the two lines of code where I am attempting to route it to where the Java pgms are stroed.
ADDENVVAR ENVVAR(CLASSPATH) VALUE(‘/Root/JAVA_HOME’)
JAVA CLASS(‘RemoteLaunch.jar’) PARM(&LINKAGE)
For clarification, do you actually have a directory named “Root” within your root directory? If you type this command:
…what happens?
Don’t get confused over the file system that is referred to as “/root” and which is indicated simply by specifying an absolute path name. (An absolute path begins with “/”.)
Tom
WRKLNK OBJ(‘/Root’) results in Object not found.