I do have one question, is "start" a builtin MS-DOS command, and so not a separate program? It's just that when you are in a command line, you're actually in a dos prompt. Some command are interpreted by the prompt. When a command is not a built in command, then an executable is searched. If no executable is found, you got an error. I think that Runtime.getRuntime().exec( "something" ) doesn't launch a dos prompt, and so if "something" is a built-in command, it won't execute.
Hi there:
The exception is
java.io.IOException: CreateProcess: start "c:/temp/desktop/bob/data/abc.doc" error=2
at java.lang.Win32Process.create(Native Method)
at java.lang.Win32Process.<init>(Unknown Source)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at desktop_v1_f.novell.io.IOManager.showFile(IOManager.java:42)
at desktop_v1_f.novell.core.MainDesktopManager.showFile(MainDesktopManager.java:74)
at desktop_v1_f.novell.gui.Surfboard.openF(Surfboard.java:267)
at desktop_v1_f.novell.gui.Surfboard.detailsTable_mouseClicked(Surfboard.java:283)
at desktop_v1_f.novell.gui.Surfboard_detailsTable_mouseAdapter.mouseClicked(Surfboard.java:320)
at java.awt.AWTEventMulticaster.mouseClicked(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Actually, I test seven computers in my office only one works. They are all running win2000. I even imported the registry from the "lucky" one to my machine, but the problem stays the same.
On the contrary, at my home's machine it works both on win98/win2000.
It really don't make sense.
Help me out please!
Regards
Now I found a work-around. I copy the "start.exe" from my win98 machine to win2000 machine under the folder of winnt/system32, everything works fine. So now I think maybe the problem is the "start.exe" command. the buildin start.exe command doesn't work properly, or .....
So how can I configure win2000 to be proper environment to run that java code ?
Regards