Runtime.exec
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Hetal_Patel
Posted On:   Tuesday, February 17, 2004 03:43 AM

			
I can not run the shell commands using Runtime.getRuntime().exec(ls).

It gives error like

java.io.IOException: CreateProcess: ls error=2
at java.lang.Win32Process.create(Native Method)
at java.lang.Win32Process. (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 test1.main(test1.java:13)

Please help me

Re: Runtime.exec

Posted By:   Simon_Ablett  
Posted On:   Tuesday, February 17, 2004 06:04 AM

"ls" is not a valid command under Windows. Try 'dir'.

Regards.
About | Sitemap | Contact