摘要:
You embed jython and you will use some Python-Modules somewere:if you want to set the path (sys.path) in your Java-Code :public void init() { interp = new PythonInterpreter(null, new PySystemState()); PySystemState sys = Py.getSystemState(); sys.path.append(new PyString(rootPath)); sys.path.append(n 阅读全文
posted @ 2011-05-25 16:21
规格严格-功夫到家
阅读(374)
评论(0)
推荐(0)
摘要:
String urlString = ClassLoader.getSystemClassLoader().getResource("com/my/package/MyClass.class").toString();urlString = urlString.substring(urlString.indexOf("file:"), urlString.indexOf('!'));URL url = new URL(urlString);File file = new File(url.toURI());System.out.print 阅读全文
posted @ 2011-05-25 08:48
规格严格-功夫到家
阅读(356)
评论(0)
推荐(0)