View Full Version : Problem With JAVA


SonOfBOB
08-21-03, 03:39 PM
I justarted leaning how to program in java and so when I try to run a file I have created it gives me a single error which stats something about classdefnotfound.
can someone please help

AntonK
08-21-03, 05:11 PM
Java is a very simple language to learn. Here is a sample program:

class HelloWorldApp {
public static void main(String[] args) {
System.out.println("Hello World!"); //Display the string.
}
}

We save it in a fille called HelloWorldApp.java
The filename and the class name must be the same. Once we save it we compile the code to bytecode like this:

javac HelloWorldApp.java

Then we run it like this:

java HelloWorldApp


Thats all there is to it.

-AntonK

testify
08-21-03, 10:16 PM
JAVA ROCKS! :D

CompiledMonkey
08-21-03, 10:37 PM
AntonK gave you a great tutorial on getting your first app going. If you need help, post your code and how you're trying to compile and run it. That will help us in helping you. ;)

SonOfBOB
08-22-03, 02:46 PM
thank you very much and I will probably come back here when I have more problems