Common errors in java programming..
Posted by jimstech on March 29, 2009
'javac' is not recognized as an internal or external command, operable program or batch file:
If you receive this error, Windows cannot find the compiler (
Here’s one way to tell Windows where to find
javac. Suppose you installed the JDK in
C:\jdk6. At the prompt you would type the following command and press Enter:
If you choose this option, you’ll have to precede your
java commands with
C:\jdk6\bin\ each time you compile or run a program.
If you mistype part of a program, the compiler may issue a syntax error. The message usually displays the type of the error, the line number where the error was detected, the code on that line, and the position of the error within the code. Here’s an error caused by omitting a semicolon (
;) at the end of a statement:
testing.java:14: `;' expected. System.out.println("Input has " + count + " chars.") ^ 1 error
To know Additional details about classes and their functions,CLICK HERE…