Windows 7 Java Problem
This is a bit of a weird problem with windows 7/Java
I am running 64bit windows 7 home premium, and have jre6 and jdk 1.6.0_20 installed on my computer and i've come to realize that if i'm running java .jar files from the command line, the 64bit version of java is invoked, but if i just double click the jar file, then 32bit java is invoked.
im not sure if this is the correct place for this question, but like i said its a weird problem.
does anyone have a clue why this happens?
There's a 64bit JRE download. (eg here). Make sure you have that one installed.
I do have the correct jre installed, so here are more specifics:
I've created an installer for a java desktop application that is an executable jar, it is essentially a wrapper for the application and the JRE, when the installer is clicked the JRE is loaded via command prompt and therefore the 64bit version of java is loaded and the application does not load properly. Now if i just double click the jar file that is my application the 32bit java jre is loaded and all is well. I would like to know why this difference occurs and if there is anyway to change it
windows comes with java 32bit installed into
when you install it yourself, you can choose to install the 64bit version of Java to
but you need to update the ClassPath Paths because you have 2 instances of the Java Runtime Environment
To edit this, click START > Right-Click My Computer > Click Properties
Under the "Advanced" tab you should see "Environment Variables..." at the bottom. Click it.
In Environment Variables, look at the list, select CLASSPATH from the list and click "Edit...".
DO NOT remove any windows system paths from the list as this will screw up your windows OS.
Just look for any instance of JAVA and change any instace of Program Files(x86)/Java to the folder where you installed the 64bit version.