File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Running Java programs outside of IDE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Running Java programs outside of IDE" Watch "Running Java programs outside of IDE" New topic

Running Java programs outside of IDE

Travis Sobeck

Joined: Jun 08, 2005
Posts: 1
I can build programs, compile them, and run them in the IDE just fine. The question is, how do I run the program on a machine with JRE without the IDE?
Jeff Langr
Ranch Hand

Joined: May 14, 2003
Posts: 799
Use the java executable (java.exe under Windows). Make sure you have a path to the bin directory of your JRE. Then execute something like:

You can set your classpath ahead of time, if necessary, or set it using the -classpath (or -cp) option. For details on the java command, simply enter java at the command line.


Books: Pragmatic Unit Testing in Java, Agile Java, Modern C++ Programming with TDD, Essential Java Style, Agile in a Flash. Contributor, Clean Code.
I agree. Here's the link:
subject: Running Java programs outside of IDE
It's not a secret anymore!