Results 1 to 3 of 3
Thread: Runtime.exec()
- 08-14-2008, 04:43 PM #1
Member
- Join Date
- Jun 2008
- Posts
- 2
- Rep Power
- 0
Runtime.exec()
Hi all,
I am launching some external applications from java Runtime.exec(). It works fine when everything goes well(i.e the application path is correct, file to launch is ok. etc...) but I wonder is there any way to determine if the application is installed before I launch, since I believe Runtime.exec() does not provide much control after it is called. I just need to know how I can determine if the application exists(installed) before I launch from java . It doesn't have to be using java Runtime but any method would be fine. here is my general scenerio
1. 1 of 2 applications to lunch
2. I can assume that the user will have at least one of them installed
3. depending on what is installed, I willl launch using it
4. if both of them are installed, I will give the user to select one of them.
Thanks in advance
Nick
- 08-14-2008, 05:54 PM #2
I assume that the applications are files located somewhere on the OS's path (the PATH environ var in windows, I don't know about other OS). If you can get the value of PATH, then you could look on all the paths for the file that starts the application.
- 08-16-2008, 12:40 AM #3
Member
- Join Date
- Jan 2008
- Posts
- 22
- Rep Power
- 0
Similar Threads
-
Problem with Runtime.exec()
By nhabibi in forum Advanced JavaReplies: 11Last Post: 07-02-2008, 01:35 AM -
Runtime.exec(), handling input and output streams
By crookshank in forum New To JavaReplies: 0Last Post: 06-05-2008, 02:41 PM -
Exec cmd from Java application
By javaplus in forum New To JavaReplies: 0Last Post: 12-17-2007, 08:41 AM -
Nuxeo Runtime 1.2
By JavaBean in forum Java SoftwareReplies: 0Last Post: 06-22-2007, 06:01 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks