Search code examples
javasquirrel-sql

"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.


Solution

  • 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