aspose file tools*
The moose likes Beginning Java and the fly likes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark ""could not find main class: program will exit"" Watch ""could not find main class: program will exit"" New topic
Author

"could not find main class: program will exit"

Jesse Crockett
Ranch Hand

Joined: Feb 03, 2005
Posts: 129
Not a programming question, but I'm trying to install azureus. Their jar file will not open on windows. I have the java JRE installed. Apparently there is no CLASSPATH setting in the environment variables. It is not there. What do I do?
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14269
    
  21

Is it an executable JAR file (i.e., a JAR file which you double click to run)? If so, then the CLASSPATH environment variable is not applicable. In an executable JAR file, the classpath in the manifest file which is inside the META-INF directory in the JAR file determines the classpath.

The error message might mean that there's something wrong with the JAR file (maybe it's corrupted in some way?). Are you sure that you're using the right version of Java?

If it's not an executable JAR, but a command batch file (*.bat or *.cmd) that you use to start the program, then look in the file to see how it exactly starts up the program.
[ January 15, 2007: Message edited by: Jesper Young ]

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
Jesse Crockett
Ranch Hand

Joined: Feb 03, 2005
Posts: 129
Yes, it is an executable jar.
 
jQuery in Action, 2nd edition
 
subject: "could not find main class: program will exit"