Normally saying "the program compiled" means it compiled successfully -- there were no errors. Or do you mean there were runtime errors (exceptions)? There were no exceptions. What I meant was that no errors showed up when I called "javac MyProject.java". The errors only appeared when I called "java MyProject". I was under the impression that any compile errors would appear on the javac call, but I guess I was wrong.
This is what java would report if HellowWorld had failed to compile. If you list the files, do you see "HelloWorld.class"? If not, it didn't compile. The class file does exist, so apparently it compiled correctly.
Make sure you have the JDK version you installed and that it's located where you expect. javac -version produces:
javac 1.5.0_01
javac: no source files
Usage: javac <options> <source files>
where possible options include:
-g Generate all debugging info
-g:none Generate no debugging info
-g:{lines,vars,source} Generate only some debugging info
-nowarn Generate no warnings
-verbose Output messages about what the compiler is doing
-deprecation Output source locations where deprecated APIs are u
sed
-classpath <path> Specify where to find user class files
-cp <path> Specify where to find user class files
-sourcepath <path> Specify where to find input source files
-bootclasspath <path> Override location of bootstrap class files
-extdirs <dirs> Override location of installed extensions
-endorseddirs <dirs> Override location of endorsed standards path
-d <directory> Specify where to place generated class files
-encoding <encoding> Specify character encoding used by source files
-source <release> Provide source compatibility with specified release
-target <release> Generate class files for specific VM version
-version Version information
-help Print a synopsis of standard options
-X Print a synopsis of nonstandard options
-J<flag> Pass <flag> directly to the runtime system
java -version produces:
java version "1.5.0_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_01-b08)
Java HotSpot(TM) Client VM (build 1.5.0_01-b08, mixed mode, sharing)
My environment variables appear to be set correctly.
If that all pans out, and javac is definitely not reporting errors, post your HelloWorld.java. class HelloWorld
{
public static void main(
String args[])
{
System.out.println("Hello World!");
}
}