i have written a simple java program using a Runtime.exec() .i was able to run my java program in the pc which i used to compiled the code.but when i migrate my program in to an another machine having the same OS(windows XP),my code did not worked .there was not any signs of execution of my code.why this was occured .explain me.
Runtime.exec()
Collapse
X
-
What did the program do ?Originally posted by madhawa84i have written a simple java program using a Runtime.exec() .i was able to run my java program in the pc which i used to compiled the code.but when i migrate my program in to an another machine having the same OS(windows XP),my code did not worked .there was not any signs of execution of my code.why this was occured .explain me. -
What happened when you tried to run the program on that other machine. Are using a jar file? Also, are you able to run those DOS commands from the DOS shell on that machine.Originally posted by madhawa84my intention of above program was to pass some dos commands using Runtime.exec(). but i was able to run the code in my pc .but i was unable to run that class in an another pc.why is that?Comment
-
Which OS? Try putting println statements to see where the code hanging.Originally posted by madhawa84no i did not use any jar file,but instaed i copied the class file and tried to execute it via the "java "command.wh en i run the code nothing happened, at least no any sign of errors or whether the execution of the code or not.Comment
Comment