This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes launch other programs from Java app Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "launch other programs from Java app" Watch "launch other programs from Java app" New topic
Author

launch other programs from Java app

steve anson
Greenhorn

Joined: Oct 20, 2003
Posts: 8
Hi
I am writing a program that writes .html files.
Does any one know how I can launch default browser to on the target system in order to test it (from within my java application)
Thanks Steve
Chris Harris
Ranch Hand

Joined: Sep 21, 2003
Posts: 231
Hi steve,
If you want to execute other programs from within you code have a look at
Runtime.getRuntime().exec(cmd);
Warning once you do this you program will be platfrom dependent.
Here is a good example of how to launch an internet browner.
Hope that helps.
Chris
[ November 21, 2003: Message edited by: Chris Harris ]

SCJP 1.2, SCWCD, SCBCD
 
Don't get me started about those stupid light bulbs.
 
subject: launch other programs from Java app