Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with jar file

Status
Not open for further replies.

rvy2k

Programmer
Jun 29, 2001
39
0
0
US
When I double click on my jar file, I get the foolowing error:

"Could not find the main class. Program will exit!"

I tried
% javaw My JarFile
and it launches fine.

Anybody had the same problem?

Thanks
 
Did you configure the Manifest correctly (ie did you set the Main-Class)? Wushutwist
 
i think ...


Manifest-Version: 1.0
Name: Me
Main-Class: HelloWorld

 
How do u open up the Jar.
What is the default viewer for Jar.
Shyam Shyam
 
javaw.
also the title on the error box is "Java Virtual Machine Launcher"

thanks.
 
Hurrah I got the Probs.

When you use Javaw ClassName MyJarName.
In the ClassName class u don't have any main method to be invoked. That is the error it is raising when you try to run a class from the jar.

Please check up whether that class has main method or not.
Please check for it and run

Shyam
Shyam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top