| | |
Error message when running simple Java pgm
![]() |
•
•
Join Date: Aug 2004
Posts: 2
Reputation:
Solved Threads: 0
used following in MS-DOSS command window
public class Welcome1 {
/*method*/
public static void main( String args [])
{
System.out.println( "Welcome to Java Programming!" );
}/*end main*/
}/*end class Welcome1*/
It was taken as an elementry example of a Jova pgm.
I saved it as Welcome1.java and used the MS-DOS command line, > java Welcome1 There was a momentary hesitation and I received the following Error message
Exception in thread "main" Java.lang.NoClassDefFoundError:Welcome1
I'm trying to learn Java on my own. I'd like some help in taking this first step. Any suggestions????
TonyPerez
public class Welcome1 {
/*method*/
public static void main( String args [])
{
System.out.println( "Welcome to Java Programming!" );
}/*end main*/
}/*end class Welcome1*/
It was taken as an elementry example of a Jova pgm.
I saved it as Welcome1.java and used the MS-DOS command line, > java Welcome1 There was a momentary hesitation and I received the following Error message
Exception in thread "main" Java.lang.NoClassDefFoundError:Welcome1
I'm trying to learn Java on my own. I'd like some help in taking this first step. Any suggestions????
TonyPerez
You need to add it to your system variables. It depends on what OS you're running as to how to do this. Or you could just type in the full path name like:
C:\Program Files\Sun\JavaSDK\bin\javac.exe program.java
C:\Program Files\Sun|JavaSDK\bin\java.exe program
Of course, your's is probably different. But youshould get the idea.
C:\Program Files\Sun\JavaSDK\bin\javac.exe program.java
C:\Program Files\Sun|JavaSDK\bin\java.exe program
Of course, your's is probably different. But youshould get the idea.
![]() |
Similar Threads
- Help on this Java error message. Part 1 (Java)
- Page Cannot be diplayed/DNS error message (Viruses, Spyware and other Nasties)
- Error message when trying to install Java (Windows 95 / 98 / Me)
- Error message when running ASP email script (ASP)
- javayk.dll RUNDLL Error message at startup (Viruses, Spyware and other Nasties)
Other Threads in the Java Forum
- Previous Thread: "String class"
- Next Thread: Need help with Quiz code
| Thread Tools | Search this Thread |
-xlint actionlistener add android applet application array automation bank bi binary blackberry block bluetooth character class client code compile compiler component consumer database desktop developmenthelp eclipse equation error event fractal ftp functiontesting game gameprogramming givemetehcodez graphics gui health html hyper idea image infinite int j2me j2seprojects java javac javaee javame javaprojects jetbrains jni jpanel jtable julia learningresources lego linked linux mac main method mobile myregfun netbeans notdisplaying number online pearl printf problem program qt researchinmotion rotatetext rsa scanner screen server set singleton sms sort spamblocker sql string swing system textfields thread threads time title tree tutorial-sample update variablebinding windows xor






