I dad left Java since so long as a result now it happens that sometimes I forget the simple things and used to behave like a Stupid.
To run a Simple Java program say “Hello World” written in Notepad what do I have to Do?
I know the commands javac “Filename.java” and java “Filename” respectively to run it from the Command prompt.
But When I try to do that I got this message:
“javac is not recognized as an internal or external command, operable program or batch file.”
and I could not Complie the file.
I hava little idea that we need to do some stuffs like setting the classpath or perhaps the path evnironment variables but it was exactly that I don’t remember.
Can anybody please help me?
Thanks,
david
1) create JAVA_HOME environmental variable set value to java home directory
e.g.
c:\program files\java\jdk1.5;1) set PATH in environmental variable to your java bin directory
e.g.
%JAVA_HOME%\binand to check classpath is set correctly run
javaccommand on cmdand this link will help to create and run simple java application
java tutorial