Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

open an application from a menu

 
Sandra Waller
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 349
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 168
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic