Running from the Command Line

How do I run my program from the "command line". I'm not even too sure what this means. I found some examples on the Internet, and figured that the String[] args parameter in the main method are the arguments that are passed to the program from the command line. But how do I actually run my program from the command line and enter these parameters?

[357 byte] By [Lava_Javaa] at [2007-11-26 20:49:29]
# 1
Look at the [url= http://java.sun.com/docs/books/tutorial/getStarted/cupojava/win32.html]HelloWorld tutorial[/url]; that is run from the command line.
Djaunla at 2007-7-10 2:13:24 > top of Java-index,Java Essentials,New To Java...
# 2
When I try to compile it as a class file, I get an error:'javac' is not recognized as an internal or external command, operable program or batch file
Lava_Javaa at 2007-7-10 2:13:24 > top of Java-index,Java Essentials,New To Java...
# 3
add the location of your java 'bin' folder to your PATH. The Readme file that comes with it and is on the download site will instruct you how. Be careful not to mess up your path.I am assuming - badbadbad - you are on Windows.
abillconsla at 2007-7-10 2:13:24 > top of Java-index,Java Essentials,New To Java...
# 4
I have multiple bin folders under the Java directory. Which one do I want? Sorry for all the n00b questions, but this is quite new to me, and was never taught. I won't be replying for the next few hours or assigning Dukes because I have to leave. Sorry.
Lava_Javaa at 2007-7-10 2:13:24 > top of Java-index,Java Essentials,New To Java...
# 5
How many of those bin folders contain files named javac.exe?
DrLaszloJamfa at 2007-7-10 2:13:24 > top of Java-index,Java Essentials,New To Java...
# 6

> I have multiple bin folders under the Java directory.

> Which one do I want? Sorry for all the n00b

> questions, but this is quite new to me, and was never

> taught. I won't be replying for the next few hours or

> assigning Dukes because I have to leave. Sorry.

Depending on where you have your jdk set up, it could be like this:

me> C:\j2sdk1.4.2_04\bin

-or - if it's v6x, like I have at home:

me>c:\Program Files\java\%sdk6somethingIdontrememberoftop%\bin

HTH ... read the Readme file - I tells you all this.

~Bill

abillconsla at 2007-7-10 2:13:24 > top of Java-index,Java Essentials,New To Java...