|
Thanks for the link. Dan Feather wrote:
I posted your question to the JT400 Support Forums and Jeff Lee there posted this link: http://publib.boulder.ibm.com/infocenter/iseries/v5r3/ic2924/index.htm?i nfo/rzaha/sysprop.htm And then check out the link near the top of that page for the "List of Java system properties" I think you can use the information found there to figure out what you need to look at to determine what JVM is going to get used... since that is how OS/400 will do it. I am curious though why you need to add the tools.jar to the classpath? That just seems odd to me. Dan Feather -----Original Message----- From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-bounces@xxxxxxxxxxxx] On Behalf Of TitanRebel Sent: Thursday, August 04, 2005 12:44 PM To: Java Programming on and around the iSeries / AS400 Subject: Re: Can I detect Java version before my java program starts? Thanks for the suggestions and the logic! Now, does anyone know of a way to determine which version is going to beused? I don't think it automatically uses the highest version (am I wrong?) It seems to be different based on version, release, and modification of OS400.I guess I could find out what the default is for each VRM of OS400 and add logic to the script to take this into account. Then I would also have to look for the existance of .props files (I forget the location and names right now) that could also determine which version is going tobe used. I was just hoping there was an "easier" way to tell. Thanks, Ken Bruce Jin wrote: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 thelocationof 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
As an Amazon Associate we earn from qualifying purchases.
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.