Link to home
Start Free TrialLog in
Avatar of chima
chima

asked on

Java 1.5, 1.6 and 1.7 along with jnlp

Hello,
Please reference; https://www.experts-exchange.com/questions/28495151/Java-1-5-1-7-and-JNLP.html
The solution, as explained here; http://stackoverflow.com/questions/21404830/securityexception-during-executing-jnlp-file-missing-required-permissions-manif  partially worked.  What I did was selected the Java 1.6 at the Java Control Panel and set the Security to its lowest level.  This allowed me to run the application, yet the Java console was/is showing that I am still using Java 1.7.
I need for it to use 1.6_37
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

Duplicate of a question you said was answered?
https://www.experts-exchange.com/questions/28495151/Java-1-5-1-7-and-JNLP.html

If the application is running properly why do you need it to say 1.6.x?
Avatar of chima
chima

ASKER

David, it is partially running correctly.  Initially I couldn't even log in.  When I employ these settings I can log in, but when it does a db query it hangs.  A check on the Java Control Panel it shows that it is trying to use Java 1.7 and it should be using Java 1.6_37.
ASKER CERTIFIED SOLUTION
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of chima

ASKER

David, I am actually dealing with three applications, each uses a different version of java.  May i request a couple of clarifications;
My java versions are all at JAVA_HOME= C:\Program Files~(x86)\Java\  here I have the jre and jdk for 1.5_22, 1.6_37 and 1.7_67.
I can understand using the bat file to set each one when I need each individual version.  Is this what the bat file is intended to do?
 My CLASSPATH is now set to %JAVA_HOME%\jre\lib  I do not see/find the classlib there.
For cd \java1.6  I would think it would have to be \Program Files (x86)\Java\jre
And java java.jar is not working.  I get this;
Exception in thread "main" java.lang.NoClassDefFoundError: java/jar

Please clarify my comments, thanks
David Johnson, CD, MVP already gave you a good strategy for solving the problem.  You might need to look at how to run java programs from the command line:
http://docs.oracle.com/javase/tutorial/essential/environment/paths.html

Basic windows programming tutorials might help too.  If you set an environment variable to be %JAVA_HOME%/jre/lib then all of your programs will use that path.  You have said you want to use 3 different java_home values -- obviously you can't use a single value if you want different ones.

To execute a java main program from a jar -- as it looks as if you're doing with your "java java.jar" statement? -- then you have to name the main program or use the manifest feature of jars to name your main program.  Again -- just a few tutorials would probably help you.

Try creating a very simple java program with a main method, put it in a jar, then try your tests.  That will help you figure out the correct environments without having to spend a lot of time getting more complex programs working.
Avatar of chima

ASKER

thanks