JAVA classpath

75 pts.
Tags:
CLASSPATH
IFS
Java
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?

ASKED: December 15, 2009  4:37 PM
UPDATED: December 18, 2009  3:53 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

<pre>ADDENVVAR ENVVAR(CLASSPATH) VALUE(’/Root/JAVA_HOME’)</pre>Then that can’t be right. If there is no directory named ‘/Root’, you can’t have a path that begins with ‘/Root’.

Please ensure that you aren’t using /Root just because you’re working in the ‘root’ file system. It might be that your path is actually ‘/JAVA_HOME’. That would be a top-level directory in the ‘root’ file system.

Tom

Discuss This Question: 4  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    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
    125,585 pointsBadges:
    report
  • Droutt
    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)
    75 pointsBadges:
    report
  • TomLiotta
    For clarification, do you actually have a directory named "Root" within your root directory? If you type this command:
    wrklnk '/Root'
    ...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
    125,585 pointsBadges:
    report
  • Droutt
    WRKLNK OBJ('/Root') results in Object not found.
    75 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following