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 open an application from a menu Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "open an application from a menu" Watch "open an application from a menu" New topic

open an application from a menu

Sandra Waller

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.
Hope someone else can help you betterly!
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:
Hope this helps
"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
I agree. Here's the link:
subject: open an application from a menu
It's not a secret anymore!