How do i use javac anywhere?

i want to use javac anywhere. so that i can compile and run the code anywhere, not only from the bin directory. which variable i should set as wht? do help me plz!!
[171 byte] By [Vive_JavaNETa] at [2007-11-27 6:13:53]
# 1

Set your PATH environment variable.

I assume from your username that you are on Windows of some sort.

Go to Control Panel -> System -> Advanced - >Environment Variables

Somewhere in there will be PATH. Add the directory that holds you javac to this path (be sure to use ; to seperate elements of your path)

cotton.ma at 2007-7-12 17:22:51 > top of Java-index,Java Essentials,Java Programming...
# 2
... Or you can type in the path of the program:"/Program Files/Java/jdk1.6.0/bin/javac" Foo.javaThe quotes are needed because of the space in the folder "Program Files"
Hippolytea at 2007-7-12 17:22:51 > top of Java-index,Java Essentials,Java Programming...
# 3

> ... Or you can type in the path of the program:

>

> "/Program Files/Java/jdk1.6.0/bin/javac" Foo.java

>

> The quotes are needed because of the space in the

> folder "Program Files"

Or, if you're already going to go through the convoluted mess of typing out the full path every time you want to run the executable, you could further muck things up by typing:

/progra~1/java/jdk1.6.0/bin/javac [filename]

(Hint: just fix your path variable. ;-)

Navy_Codera at 2007-7-12 17:22:51 > top of Java-index,Java Essentials,Java Programming...