Andy
Andy

Reputation: 3682

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

Upvotes: 4

Views: 11429

Answers (3)

Dave
Dave

Reputation: 4597

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

Upvotes: 0

Garrett Hall
Garrett Hall

Reputation: 30022

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.

Upvotes: 1

Zhedar
Zhedar

Reputation: 3510

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.

Upvotes: 2

Related Questions