0

I tried a lot to open a JAR file but it is not opening.I typed in command prompt

javaw -jar MyJar.jar but it is not open. It makes some error sound bt not open.

Please help me regard this

4
Contributors
5
Replies
8
Views
6 Years
Discussion Span
Last Post by Ezzaral
0

java -jar <MyJar.jar> ....(will only work for executable jar files. Not all jar files are executable)

or if you still have a problem then it will most probably be a class path problem. If you still have a problem tell me.

Edited by Akill10: n/a

0

It makes some error sound

use the java command instead of javaw and you should get an error message on the screen.
Copy and paste the message here if you have questions about it.
To copy the contents of the command prompt window:
Click on Icon in upper left corner
Select Edit
Select 'Select All' - The selection will show
Click in upper left again
Select Edit and click 'Copy'

Paste here.

0

When I execute the jar file in cmd as you said like:
java -jar MyJar.jar

Failed to load Main-Class manifest attribute from
MyJar.jar

And when I simply double clicked on the particular jar file its give a error sound and nothing happened.I already set the java path and jre path in the "environmental variables" section.

Through Netbeans I create the jar file

Edited by subrat_p: n/a

0

Failed to load Main-Class manifest attribute

Look in the jar file (use a zip utility) and see if it has a manifest file and if the manifest file has a Main-Class: record.
The java program can not find it.

Sorry, I have no idea how to use your IDE.

0

In Netbeans, you can open the project properties and look at the "Run" category. There is an entry for Main Class there. Be sure that is set to the class you are wanting to run and then clean and build your project.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.