JPF Error of "getRuntime().exec"

30 views
Skip to first unread message

concolic...@gmail.com

unread,
Aug 6, 2015, 12:12:58 PM8/6/15
to Java™ Pathfinder
Hi all, 

I want to test the java codes which include command line execution by JPF.
For example, like this.

...
String[] cmd = {"java","-version"};
Runtime.getRuntime().exec(cmd);
...

But I have this error.

====================================================== error 1
gov.nasa.jpf.vm.NoUncaughtExceptionsProperty
java.lang.UnsupportedOperationException: sun.misc.SharedSecrets.getJavaIOFileDescriptorAccess() not supported yet
at sun.misc.SharedSecrets.getJavaIOFileDescriptorAccess(sun/misc/SharedSecrets.java:133)
at java.lang.ProcessImpl.<clinit>
at java.lang.ProcessBuilder.start
at java.lang.Runtime.exec
at java.lang.Runtime.exec
at demo.Runtime_sample.execCmd(demo/Runtime_sample.java:58)
at demo.Runtime_sample.main(demo/Runtime_sample.java:137)


====================================================== snapshot #1
thread java.lang.Thread:{id:0,name:main,status:RUNNING,priority:5,isDaemon:false,lockCount:0,suspendCount:0}
  owned locks:java.lang.Class@18a
  call stack:
at java.lang.ProcessImpl.<clinit>(pc 0)
at java.lang.ProcessBuilder.start(pc 161)
at java.lang.Runtime.exec(pc 16)
at java.lang.Runtime.exec(pc 4)
at demo.Runtime_sample.execCmd(Runtime_sample.java:58)
at demo.Runtime_sample.main(Runtime_sample.java:137)

======================================================

Of course the target program is correctly.

I tried the same program testing without "Runtime.getRuntime().exec(cmd);" by JPF but no error occurred.

Any suggestion please?

Thank you!

Reply all
Reply to author
Forward
0 new messages