|
-
September 26th, 2000, 09:11 AM
#1
Calling Windows Applications
I can get my java program to launch MS Word, Notepad, etc. with this code:
String s = "msword.exe";
try {Runtime.getRuntime().exec(s);}
catch (IOException e) {}
However, I need to clean up a bit and put the local path in. I know the escape chars must be accounted for, so \\msword.exe would work...but I don't want to hard-code c:
I've tried "%\\msword.exe" and "%ROOT%\\msword.exe" (with the full path included obviously), but those don't seem to work. Any clue how to pull in the root?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|