daileyps
September 26th, 2000, 09:11 AM
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?
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?