i have installed java in c: program files and trying to run it from java directory
with javac Helloworld.java but it is not working
i get the message that javac file cannot be recognized
So many people have that sort of problem that there is a section about it in the Java Tutorials. See whether that helps. Note there is a "common problems" page.
Set the path and classpath of the java directory as shown below.
1. Right Click My Computer and select properties.
2. click on Advanced tab and then click on Environmental variables button
3. click on New button of the system variables section and type the variable path as 'path' and variable value as 'java installed directory' + bin
(For eg: C:\Program Files\Java\jdk1.6.0_05\bin)