File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Command for running a java file
 
Similar Threads
why cant i start my program in the console?
Reg:Executing Commands
Stored procedure cannot be imported from java...?
help me the code
JAXP and Xerces or JAXB