run using cmd
when i run a .java program using cmd, it seems I can only run it if there is a .class with the file.
How do i create that .class file which corresponds with the .java program, without using jcreator which automatically creates it for me?
Also whats the difference between typing:
java *.java
javac *.java
Thanks
[348 byte] By [
darksssa] at [2007-10-3 9:22:43]

I tried that out, but it said that:
'javac; is not recognized as an internal or external command,
operable program or batch file.
I typed in javac Dice.java
for a simple java program:
// comments
import java.util.Scanner;
public class Dice
{
public static void main (String[] args)
{
Scanner input = new Scanner (System.in);
// Varibles
int sides, dienum;
// comment
System.out.println ("This program will allow you to type in any number"
+ " of sides you want on a die.");
System.out.println ("Then the die will roll and give you the results");
System.out.println ("So please input the number of sides ");
sides = input.nextInt();
//If and else statement, incase user types in 0 or less
if (sides <= 0)
System.out.println ("You can't roll a dice with that many sides.");
else
{
// Code to roll the die
dienum = (int)(Math.random() * sides + 1);
// Result
System.out.println ("Your number rolled is: " + dienum);
}
}
}
is there something wrong with my porgram?
or with my cmd or what i typed in?
Thanks