简体   繁体   中英

JAR compiled on 64 bit Windows wont run on 32 bit

I have just developed and exported a Runnable JAR using Eclipse on my 64 Bit Windows 7 Laptop. I have just been trying it on other computers and it works on another Windows 7 x64 laptop when you double click it. However, on a 32 Bit laptop I have in only starts if I run it from command line using java -jar "C:\\Name of Jar.jar" but throws no errors whatsoever.

Furthermore though, if I use the command javaw "C:\\Name Of Jar.jar" I get an error message saying "Could not find the main class C:\\Name of Jar.jar. Program will exit."

Does anybody know why, and how to fix it? Thanks in advance

Did you build it with JDK 1.7? Maybe you haven't installed JRE7 on the pc you try to run it. It's an odd bug I encountered several times.

On your 32-bit machine right-click -> Open With on the JAR. If a JRE is listed, you can open with it, and make it the default program to run with.

I don't think it has to do with the 32 or 64-bit OS.

Try javaw -jar jar_name . I think that might do the trick.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM