I wanted to run java programs on a 64 bit Windows 7 computer and I have a 64 bit Java VM. How do I launch the jar files via command line ? It seems that 64 bit Windows 7 have a seperation between 32 bits and 64 bits programs.
Try giving the explicit path for each JRE you have installed:
"C:\Program Files\Java\jre7\bin\java.exe" -jar yourfile.jar
"C:\Program Files (x86)\Java\jre7\bin\java.exe" -jar yourfile.jar
"C:\Program Files (x86)\Java\jre6\bin\java.exe" -jar yourfile.jar
Make sure you have a 64 bit JRE and a 32 bit JRE. Most java software provided still needs a 32 bit JRE (as it uses JNI or other non-portable stuff).
Some jar files have information in them allowing to be executed with the
-jar switch. If that information is not present you must use the
-cp myjar.jar my.main.method.class argument to java.exe to execute your program.
Basically, if you install Java (the easiest is through http://java.com) then you can use that to run Java programs. It takes care of the correct version.
But it is not a problem to run a 32-bit JVM on a 64-bit system - the primary limitation is that your application is limited to a few gigabytes of memory.
So, if you can run
java -version you will be fine with just using the default java command available to you.