Java runtime error

sitnet

Senior Member
Joined
Apr 4, 2008
Messages
886
Reaction score
34
I've just downloaded the newest java runtime from java's site but when I try to open any java file with the virtual java machine it gives an error:confused:

This is the error: "Failed to load main-class manifest from..." (java file's path)

And it gives the same error with any java(.jar) file.

Does anyone know how to fix this or maybe where to get a standalone virtual java app?
 
I haven't worked with Java in some time but have you installed the Java SDK? Also, what runtime version are you running?
 
the problem (according to your description) is that there is no main class specified in manifest file of the jar file you are to execute. java has to know which is the main class in the jar file, to begin execution with.

first try to execute it from the command prompt:
Start | Run | cmd | Ok
cd <directory where jar file is located>
java -jar <jar file name>

if that does not work, there is something wrong with the jar file. rename it to .zip and open it up. inside the META-INF directory you will find a MANIFEST.MF file. If you open the file in notepad, it should look like this:
Code:
Manifest-Version: 1.0
Main-Class: some.class.path
 
the problem (according to your description) is that there is no main class specified in manifest file of the jar file you are to execute. java has to know which is the main class in the jar file, to begin execution with.

first try to execute it from the command prompt:
Start | Run | cmd | Ok
cd <directory where jar file is located>
java -jar <jar file name>

if that does not work, there is something wrong with the jar file. rename it to .zip and open it up. inside the META-INF directory you will find a MANIFEST.MF file. If you open the file in notepad, it should look like this:
Code:
Manifest-Version: 1.0
Main-Class: some.class.path

It does look like that but no main class is specified , so how can I edit it to spesify a main class (I am using SDK)
 
I haven't worked with Java in some time but have you installed the Java SDK? Also, what runtime version are you running?

I am using SDK version 6 update 6 (dowloaded it yesterday). And that includes the newest runtime.
 
Top
Sign up to the MyBroadband newsletter
X