Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I'm trying to run SQuirreL SQL.
I've downloaded it and installed it, but when I try to run it I get this error message:

Java Virtual Machine Launcher.
Could not find the main class.
Program will exit.

I get the gist of this, but I have not idea how to fix it. Any help?

more info:

  • I'm on Windows XP pro.
  • I have java 1.6 installed, and other apps are running OK.
  • The install ran OK.
  • I believe I've followed the installation instructions correctly.
  • To run it, I'm invoking the squirrel-sql.bat file.

Update

This question: "Could not find the main class: XX. Program will exit." gives some background on this error from the point of view of a java developer.

like image 994
AJ. Avatar asked Sep 23 '08 12:09

AJ.


People also ask

Could not find the main class program will exit Windows 10?

There are two ways to do it: Reinstall the new JRE. It should then fix the file association in the OS. Fix the file association manually.

Could not find the main class program will exit error in eclipse?

java files were there but in the same place under the /bin there were no . class files, that was the reason it could not find the classes. What I had done was moved the directory containing the library jar files, so moving those library files back, doing a restart of eclipse sorted it out.


1 Answers

Is Java installed on your computer? Is the path to its bin directory set properly (in other words if you type 'java' from the command line do you get back a list of instructions or do you get something like "java is not recognized as a .....")?

You could try try running squirrel-sql.jar from the command line (from the squirrel sql directory), using:

java -jar squirrel-sql.jar
like image 155
MB. Avatar answered Oct 14 '22 23:10

MB.