JAR compiled on 64-bit Windows will not work on 32-bit

I just developed and exported a Runnable JAR using Eclipse on my 64-bit Windows 7 laptop. I just tried this on other computers and it works on another Windows 7 x64 laptop when you double click on it. However, on a 32-bit laptop, I only start if I start it from the command line using java -jar "C:\Name of Jar.jar" , but does not cause any errors.

Also, if I use the javaw "C:\Name Of Jar.jar" command javaw "C:\Name Of Jar.jar" , I get the error message "Could not find the main class C: \ Name of Jar.jar. The program will exit."

Does anyone know why and how to fix it? thanks in advance

+4
source share
3 answers

Did you build it using JDK 1.7? You may not have installed JRE7 on the PC you are trying to run. This is a strange mistake that I have encountered several times.

+2
source

On your 32-bit computer, right-click → Open with JAR. If a JRE is specified, you can open with it and make it the default program to run.

I do not think this is due to a 32 or 64-bit OS.

+1
source

Try javaw -jar jar_name . I think this can do the trick.

0
source

Source: https://habr.com/ru/post/1432561/


All Articles