Compile with cmd

could I use cmd to compile and run a java program?so instead of using jcreator, or eclipes could i type it into cmdif so how?
[146 byte] By [darksssa] at [2007-10-3 6:55:41]
# 1
You need to use the javac command to compile, and the java command to execute. Search the forums, there are tons of threads explaining exactly how to do it.
CaptainMorgan08a at 2007-7-15 1:47:31 > top of Java-index,Developer Tools,Java Compiler...
# 2
is it possible import something, like scanner class?cause i typedjava nameofprogramand it couldnt run it, because of scanner classhow can i run it using the scanner class?whats the syntex for cmd?
darksssa at 2007-7-15 1:47:31 > top of Java-index,Developer Tools,Java Compiler...
# 3
The Scanner class is only available for version 1.5.0. If you have an older version, it will not compile.
CaptainMorgan08a at 2007-7-15 1:47:32 > top of Java-index,Developer Tools,Java Compiler...
# 4

Hey

not sure if what you asked has been answered but you use the scanner if you want to Read from the keyboard or from a file.

If you want to use the scanner for something being read in from the keyboard then use:

import java.util.Scanner; // This goes at the top of your code.

Then

Scanner scan = new Scanner(System.in); // This would go below your declared variables. Systemin means reading from keyboard.

then use the

scan.next(); //for Strings

OR

scan.nextIntORscan.nextDouble // To go to the next.

Hope this helps not sure if this is what you meant

SHIFTERa at 2007-7-15 1:47:32 > top of Java-index,Developer Tools,Java Compiler...