Windows – Can not open “.jar” file in windows 8

jarjavajrewindowswindows 8

I downloaded a jar application named Need for speed most wanted. I double clicked on the jar file icon, however it did not execute.

I checked I have jre installed in my windows 8 (64 bit) machine in path "C:\Program Files\Java\jre8\bin" and there is also javaw file.

I saw some link like Running Jar file in Windows, how to run .jar file by double click on windows 7 (64) and Can't Run JAR Files but none of them helped me.

I also installed Jarfix and used it. Any way it does not work for me.

I tried to run jar application using command prompt using command:

java -jar "NeedForSpeedMostWanted"

But I get error:

Error: Unable to access jarfile NeedForSpeedMostWanted

And I tried adding .jar extension to command:

java -jar "NeedForSpeedMostWanted.jar" 

But again I get another error:

no main manifest attribute, in NeedForSpeedMostWanted.jar

So what else I must check to run my jar file.

Best Answer

Regarding your Original Question, the JAR file you are downloading is meant for Java Micro Edition running on Mobile Devices. So you cannot directly run those JAR'S on PC unless you have a mobile emulator (here)

As you have stated in your comment you only want to test if a JAR file is runnable or not, you can find various online. One of them Tic-Tac-Toe. Or you can pack your own JAR and test them.

Related Question