wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes open an application from a menu Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "open an application from a menu" Watch "open an application from a menu" New topic
Author

open an application from a menu

Sandra Waller
Greenhorn

Joined: Nov 01, 2001
Posts: 4
I have a drop down menu with the names of 6 programs. How do I get the applications to run from the menu. One of the applications is also an applet. I already have the menu and menu items created I just don't know the syntax to have the menu open the applications. Thank you for your time
Rashid Ali
Ranch Hand

Joined: Jan 16, 2001
Posts: 349

For this purpose you will have to study input/output operation in java to open/load the save file.
Do visit the following link where I/O operation are mentioned to read a file. But this will only open your file in text area not run your application.
http://www.javaranch.com/ubb/Forum38/HTML/000723.html
Hope someone else can help you betterly!
Regard
Rashid Ali
Michael Fitzmaurice
Ranch Hand

Joined: Aug 22, 2001
Posts: 168
You may find the Runtime.exec() method worth looking at. For example, on a windows system, the following should launch the calculator from within a Java application:
<code>
Runtime.getRuntime().exec("calc.exe");
</code>
Hope this helps
Michael
------------------
"One good thing about music - when it hits, you feel no pain"
Bob Marley


"One good thing about music - when it hits, you feel no pain" <P>Bob Marley
 
Consider Paul's rocket mass heater.
 
subject: open an application from a menu
 
Similar Threads
How can I use a javascript var in my jsp?
struts menu tooltip
Setting Short cut Keys For Menus
Dissable the windows start menu
Drag&Drop to open a new file in Eclipse IDE