【发布时间】:2014-06-11 14:52:26
【问题描述】:
我创建了一个调用 python 脚本的 java 程序
Runtime r = Runtime.getRuntime();
Process p = r.exec("cmd /c python ps.py sender-ip=10.10.10.10");
编译时出现错误:
call_py.java:1: error: class, interface, or enum expected
Runtime r = Runtime.getRuntime();
^
call_py.java:2: error: class, interface, or enum expected
Process p = r.exec("cmd /c python ps.py sender-ip=10.10.10.10");
^
2 errors
java程序和python脚本都在同一个目录下,如何解决?
【问题讨论】:
标签: java python compilation compiler-errors