提交 5bcb2c4d 编写于 作者: K kohsuke

fix up java.class.path since some programs rely on this value

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@16184 71c3de6d-444a-0410-be80-ed276b4c234a
上级 51cddcbd
......@@ -105,8 +105,15 @@ public class Launcher {
Method $addURL = URLClassLoader.class.getDeclaredMethod("addURL", URL.class);
$addURL.setAccessible(true);
for(String token : args[++i].split(File.pathSeparator))
String pathList = args[++i];
for(String token : pathList.split(File.pathSeparator))
$addURL.invoke(ClassLoader.getSystemClassLoader(),new File(token).toURI().toURL());
// fix up the system.class.path to pretend that those jar files
// are given through CLASSPATH or something.
// some tools like JAX-WS RI and Hadoop relies on this.
System.setProperty("java.class.path",System.getProperty("java.class.path")+File.pathSeparatorChar+pathList);
continue;
}
if(arg.equals("-tcp")) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册