aspose 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 Java 8 in Action this week in the Java 8 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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Call other windows program from Java program
 
Similar Threads
Shutting down the system after specified time
show temp and humidity in system tray?
Java in Windows to access Linux server
a quick reminder program...
JNI Error.... :( please help