Question

is there a way, that i could load a propertie file in a QSH Command.

The Problem is my System is running on a Java 1.4 Version and my Programm is only running in a Java 1.6 Version. So i wrote a propertie files that says, take the 1.6 version but i absulutly have no plan how to implemnt it in my code..

  java -cp "Test.jar:lib/*" my.package.MainClass

The name of the Properie file is Java_Version.properties

Do you have any solution ?

regards

Was it helpful?

Solution

You can specify a properties file to load with the environment variable QIBM_JAVA_PROPERTIES_FILE.

QIBM_JAVA_PROPERTIES_FILE=/path/to/myproperties.properties java -cp "Test.jar:lib/*" my.package.MainClass

In addition properties in a file named SystemDefault.properties will be automatically loaded if it exists in the user home directory.

Here are some links to additional documentation that may be useful:

OTHER TIPS

Use the environment variable JAVA_HOME On IBM i 7.1, I would specify:

JAVA_HOME='/QOpenSys/QIBM/ProdData/JavaVM/jdk60/64bit'
export JAVA_HOME
java -version

IBM Support Document N1011999 Support Java Versions by Operating System Release describes the JAVA_HOME settings for various operating system releases.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top