|
||||||||
![]() |
|
| Chapter 2 : Article 2 : Save , Compile and Run | |
| 01. Go to Directory D:\workarea 02. In your DOS prompt use javac to compile type in D:\workarea>javac helloworld.java , Remember its case sensitive 03. Now java compiler creates a file helloworld.class in the same directory 04. Run the java code D:\workarea>java helloworld 05. You must get D:\workarea>Hello World Message
|
|
| Exception in thread "main" java.lang.NoClassDefFoundError : helloworld | |
01. If u are a Starter in java , u may get this error some times Exception in thread "main" java.lang.NoClassDefFoundError : helloworld 02. This error can BUG a new programmer learning java , i had this many times , i never knew how to solve this , type in 03. D:\workarea>SET CLASSPATH= 04. Remember no space after CLASSPATH , now re-execute code 05. D:\workarea>java helloworld 06. If nothing works by now Restart your system or refer sun site for handling CLASSPATH Errors |
|
| Exception in thread "main" java.lang.NoSuchMethodError: main | |
|
01. This error comes in if u forget to type in String args[] |
|
|
helloworld.java '}' Expected During Compiling |
|
|
01. This error comes in if u forget } or { to type in |
|
|
invalid method declaration : return type required During Compiling |
|
|
01. This error comes in if u forget void to type in |
|
|
Cannot Resolve symbol : method printl During Compiling |
|
|
01. This error comes in if u make spelling mistake printl instead of println |
|
| Next CHAPTER 3 : >> JAVA LANGUAGE FUNDAMENTALS | |
| My Dream to be your Friend and Create a Group of Intelligent and Understanding Programmers | |
|
|
|
in the United States and other countries. |