Java Execution

Hi,

May be its ironic but I'm new to Java. I've installed the JDK 1.3.1 version on my system which has Win98 OS installed on it. I execute the simple HelloWorld program and I get the following error. Can some one help me with this?

Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld

Cheers

Manoj

[361 byte] By [manu_turlapati] at [2007-9-26 1:35:21]
# 1
you need to compile the program before you execute it.first:javac HelloWorld.javathen:java HelloWorldIf it is an applet ... you must have a html file with an applet tag. And runappletviewer HelloWorld.html
audus at 2007-6-29 2:19:36 > top of Java-index,Archived Forums,Java Programming...
# 2

Thanks a lot for the response.

I've done that part already. The class is generated without any errors. Its not an applet. Its an application. The code is as follows:

public class HelloWorld

{

static void main(String[] args) throws Exception

{

System.out.println( "Hellow World!") ;

}

}

manu_turlapati at 2007-6-29 2:19:36 > top of Java-index,Archived Forums,Java Programming...
# 3

your application should be like the next:

public class HelloWorld {

public static void main(String []arg) {

System.out.println("Hello, World!");

}

}

/*end of the code*/

FerJava at 2007-6-29 2:19:36 > top of Java-index,Archived Forums,Java Programming...
# 4

Ok my friend i got your problem

you check your classpath because your class path is not right.

This problem i already face so why i have experience of this.

Classpath=c:\jdk1.3\lib;c:\jdk1.3\include;

and make sure in classpath there must no fake entry.

have a nice time. ;)

leewaqar at 2007-6-29 2:19:36 > top of Java-index,Archived Forums,Java Programming...