Hello,
I try to use the "System execute" component.
My XML Code:
<?xml version="1.0" encoding="UTF-8"?>
<Graph name="test">
<Global/>
<Phase number="0">
<Node enabled="enabled" errorLinesNumber="3" guiHeight="0" guiName="System execute" guiWidth="0" guiX="277" guiY="166" id="SYS_EXECUTE0" type="SYS_EXECUTE">
<attr name="command">rm test.txt </attr>
</Node>
</Phase>
</Graph>
My error message
INFO: Sucessfully started all nodes in phase!
java.io.IOException: CreateProcess: rm test.txt error=2
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at org.jetel.component.SystemExecute.run(SystemExecute.java:165)
at java.lang.Thread.run(Unknown Source)
29 août 2006 11:36:19 org.jetel.graph.WatchDog watch
I don't understand the error message?
Thanks in advance
I try to use the "System execute" component.
My XML Code:
<?xml version="1.0" encoding="UTF-8"?>
<Graph name="test">
<Global/>
<Phase number="0">
<Node enabled="enabled" errorLinesNumber="3" guiHeight="0" guiName="System execute" guiWidth="0" guiX="277" guiY="166" id="SYS_EXECUTE0" type="SYS_EXECUTE">
<attr name="command">rm test.txt </attr>
</Node>
</Phase>
</Graph>
My error message
INFO: Sucessfully started all nodes in phase!
java.io.IOException: CreateProcess: rm test.txt error=2
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at org.jetel.component.SystemExecute.run(SystemExecute.java:165)
at java.lang.Thread.run(Unknown Source)
29 août 2006 11:36:19 org.jetel.graph.WatchDog watch
I don't understand the error message?
Thanks in advance
-
Hi !
Executing native processes from Java is not an easy task.
We are currently updating SYS_EXECUTE to be more "user friendly".
One thing you can try is to create a batch/shell script which you execute instead of directly calling "rm test.txt".
Put it (rm test.txt) into "command.sh" and execute "sh command.sh " instead.
That is probably the safest way for now.
David.
Please sign in to leave a comment.
Comments 1