Command Line Error

I just installed JDK1.5.0 when to javac Hello.java I get this message;'JAVAC' is not recognized as an internal or external command,operable program or batch file.Can anyone help?Thanks!
[255 byte] By [hdcolliera] at [2007-10-1 0:52:41]
# 1

As with any other app you install, you must tell your operating system where to find it. You can't just expect your operating system to magically traverse every directory on your massive hard disk to find it, can you? It's called your PATH environment variable.

Follow the instructions: http://java.sun.com/developer/onlineTraining/new2java/gettingstartedjava.html

warnerjaa at 2007-7-8 1:08:05 > top of Java-index,Security,Event Handling...
# 2

Here is my javarun.bat and my autoexec.

AUTOEXEC.BAT

@ECHO OFF

C:\pROGRA~1\COMMON~1\NETWOR~1VIRUSS~1\40~1\.XX\scan.exe c:\

@IF ERRORLEVEL 1 PAUSE

Path= c:\;c:\windows;c:\windows\command;c:\program files\java\jdk1.5.0\bin\

rem Set Classpath=.; "c:\java working directory"

and JAVARUN.BAT

@echo off

PATH=C:\;C:\Windows\;C:\Windows\Command\;c:\program files\java\jdk1.5.0\bin\

rem SET CLASSPATH="C:\Java Working Directory"

cls

hdcolliera at 2007-7-8 1:08:05 > top of Java-index,Security,Event Handling...
# 3
instead of typing javac Hello.java, typeecho %path%to see whether you can access javac or not.Read this if you need further help http://java.sun.com/j2se/1.5.0/install-windows.html
mayyoua at 2007-7-8 1:08:05 > top of Java-index,Security,Event Handling...
# 4

autoexec.bat isn't necessarily run. Aren't you running Windows XP or some other flavor? You need to set your PATH environment variable via right-clicking on "My Computer" - choose Properties/Advanced/Environment Variables.

Another note is that Java may not play well with directory names containing spaces, such as "C:\Program Files\...."

warnerjaa at 2007-7-8 1:08:05 > top of Java-index,Security,Event Handling...
# 5
you need to use set path=...
mayyoua at 2007-7-8 1:08:05 > top of Java-index,Security,Event Handling...
# 6

yes..

set path=[location of java compiler]

then when you go to your command line., what i do is type:

Java

..list of crap shows.

then you can type in your file stuff.

You have to give a path to the javac, and also in command tell it to go to that path.

Or, you could just use TextPad like I do, which I find to be a lot simpler.

JTMOBOPa at 2007-7-8 1:08:05 > top of Java-index,Security,Event Handling...
# 7
not sure...may be your windows can not handle 'space' character in your path... c:\program fiels...can you run javac without using path first? i meansome where>"C:\Program Files\Java\jdk1.5.0\bin\javac.exe"
tyranta at 2007-7-8 1:08:05 > top of Java-index,Security,Event Handling...
# 8
Hi , You can refer http://java.sun.com/j2se/1.4.2/install-windows.htmland search for How do I set the PATH permanently? I think this will resolve all queries related to setting path for compiling JAVA programs.
punjabia at 2007-7-8 1:08:05 > top of Java-index,Security,Event Handling...