Hi everyone am new to java-ing i cant seem to create a class for my first application my "Hello World" when i type javac helloworld it returns that javac is not a in the path and i have created a path for java. Please help me.

Hi kkcaddy, you need to add the .java extension to the javac command in order to compile a java file. I.e:

javac helloworld.java

then you can run the file by using the java command like so:

java helloworld

You can find more information on the javac command here:


I hope this helps. If this doesn't resolve your issue, please post the error message you are receiving, it might be that your environmental variable needs setting.
EDIT : Also, ensure that you are in the directory where your .java file is.

Edited 7 Years Ago by majestic0110: tidy up

If your shell does not understand javac command, you might want to add path to your javac in your PATH env variable.


Problem solved, thanks to those who contributed.
To get javac i had to add c:\java\jdk1.6.0_01\javac HelloWorld.java.

This question has already been answered. Start a new discussion instead.