File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Call other windows program from Java program Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Call other windows program from Java program" Watch "Call other windows program from Java program" New topic
Author

Call other windows program from Java program

Marco Yeung
Greenhorn

Joined: Sep 21, 2001
Posts: 5
Dear all,
How can I use pure Java program to call Windows programs(.exe)? e.g notepad.exe. Is there any package available in JDK?
thanks
Marco
Peter Tran
Bartender

Joined: Jan 02, 2001
Posts: 783
Marco,
You can use one of the various java.lang.Runtime.exec() methods. *WARNING* Using this method will probably make your code platform depedent. Using exec() is not JAVA friendly.
For example, there is no way for me to run your application on a UNIX box if it's going to try to kick off a notepad.exe application.
-Peter
 
 
subject: Call other windows program from Java program
 
Similar Threads
a quick reminder program...
JNI Error.... :( please help
Java in Windows to access Linux server
show temp and humidity in system tray?
Shutting down the system after specified time