Can't get my javac command to work

I installed the entire java installation in C:\Java. I Went into my cmd, found my java folder "cd C:\java\bin" and typed in "Javac HelloWorldApp.java"

I get an error saying that javac is not recognized as an internal or external command. I thought maybe I got the wrong version, I installed JDKu1. I know a its a stupid question, but I gotta to start learning Java somewhere.

[388 byte] By [Yoshoa] at [2007-11-27 6:10:59]
# 1
either set your PATH variable, or in the java\bin directory, try ".\javac HelloWorldApp.java"The former is your better bet, so you can run from any location.
bsampieria at 2007-7-12 17:16:54 > top of Java-index,Java Essentials,New To Java...
# 2
Also, when I go in to C:\java\bin my java.exe just quickly runs dos and turns it off, does that mean anything?The problem is definitely not that I have the wrong version right?
Yoshoa at 2007-7-12 17:16:54 > top of Java-index,Java Essentials,New To Java...
# 3
you mean you double-click java.exe? that's normal, it's a command-line app, there's no GUI for it. once you compile your code you run the main class the same way as compiling it.\java HelloWorldAppAt least to start with.
bsampieria at 2007-7-12 17:16:54 > top of Java-index,Java Essentials,New To Java...
# 4

> either set your PATH variable,

> or in the java\bin directory, try ".\javac

> HelloWorldApp.java"

>

> The former is your better bet, so you can run from

> any location.

Suppose someone doesn't know exactly how to set their PATH variable, could you elaborate?

saxmachinea at 2007-7-12 17:16:54 > top of Java-index,Java Essentials,New To Java...
# 5

> > either set your PATH variable,

> > or in the java\bin directory, try ".\javac

> > HelloWorldApp.java"

> >

> > The former is your better bet, so you can run from

> > any location.

>

> Suppose someone doesn't know exactly how to set their

> PATH variable, could you elaborate?

It really would be better to keep this in one thread.

First of all we don't know if you have installed the JDK (with compiler) or JRE (without compiler) at this point.

If you have the JDK installed and the path is not set you can do this through

Control Panel -> System -> Advanced Tab -> Environment variables

one of the user variables will be PATH.

These instructions are for Windows (which I know you have) XP. If you have another version the steps will be different.

First though you need to figure out what you installed and where it is. Frankly you should (and can) test it before messing around with your path to see if your prior problem has been resolved yet.

cotton.ma at 2007-7-12 17:16:54 > top of Java-index,Java Essentials,New To Java...