Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

"could not find main class: program will exit"

 
Jesse Crockett
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 15438
41
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Jesse Crockett
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, it is an executable jar.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic