× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



You can try these two methods:

1. In CL check the folder existence to decide if a particular JDK version is installed. E.g. /QIBM/ProdData/Java400/jdk14 is the location of JDK 1.4. 2. If you call qshell scripts in CL you can check installed JDK using something like this:
jdk14=/QIBM/ProdData/Java400/jdk14
jdk13=/QIBM/ProdData/Java400/jdk13
jdk12=/QIBM/ProdData/Java400/jdk12
if cd $jdk14
  then jv=4
elif cd $jdk13
  then jv=3
elif cd $jdk12
  then jv=2
else
  echo Connot find $jdk12 or $jdk13 or $jdk14!
fi
jdk=/QIBM/ProdData/Java400/jdk1$jv
echo Found JDK 1.$jv, use $jdk.
export -s JAVA_HOME=$jdk

I hope someone has better ways to do this.

Bruce

TitanRebel wrote:

I am starting a Java application on the iSeries. I don't really care which version of Java the iSeries is using as default (as long as it's above 1.3.1). The problem is that in the CL program that uses the JAVA command to start he application, I have to "hard code" the classpath to include a reference to the tools.jar file found in the JAVA_HOME directory. As you know this path changes based on the version of Java being used.

Is there a way that I can detect the version of java prior to program start and add the appropriate classpath entry then? Right now, a CL is starting the Java program "directly" with the JAVA command. This could be changed to use a QSHELL script, but I still don't know how I would do this in a shell script either.

Any help would be appreciated.

Thanks,

Ken


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.