This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Command for running a java file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Command for running a java file" Watch "Command for running a java file" New topic
Author

Command for running a java file

AKEEL MALIK
Greenhorn

Joined: Feb 03, 2005
Posts: 26
How do I run a java file from the command prompt.
I compile the file by entering javac filename.java.
Maureen Charlton
Ranch Hand

Joined: Oct 04, 2004
Posts: 218
To compile a file at the command prompt type:

javac Example.java

to run the file at the command prompt type:

java Example

Be aware that it is case sensitive i.e. example is not the same as Example.
 
jQuery in Action, 2nd edition
 
subject: Command for running a java file
 
Similar Threads
JAXP and Xerces or JAXB
why cant i start my program in the console?
Stored procedure cannot be imported from java...?
help me the code
Reg:Executing Commands