wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Run the program that uses Swing component Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Run the program that uses Swing component" Watch "Run the program that uses Swing component" New topic
Author

Run the program that uses Swing component

Elaine Hu
Greenhorn

Joined: Dec 06, 2001
Posts: 1
Hi, I have a question about running any Java program. Usually, after compiling the program successfully, I use the v1.3 interpreter to run the program under Command Prompt; for example: java SwingApplication
However, is Command Prompt the only way to open and run the program? I was wondering if it's possible to make the program automatically execute and run by double-clicking on a small icon, just like when double-clicking on the small ICQ icon, ICQ program opens up and run.
Thanks very much for the help!

Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Create a .bat file or whatever and put the commands to start the app in there. Then you can just double click the bat file.


"JavaRanch, where the deer and the Certified play" - David O'Meara
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Or create an executable JAR file.
http://java.sun.com/docs/books/tutorial/jar/index.html

------------------
Happy Coding,
Gregg Bolinger


GenRocket - Experts at Building Test Data
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Run the program that uses Swing component