更新时间:2023-01-14 22:32:31
通过叉=FALSE
的< java的>
任务将使用加载类的只有的从任务本身的类路径(即 classpathref
属性或<&类路径GT; 嵌套元素),除了组特定的硬件codeD包$ P $的pfixes 它会尝试,如果他们没有对任务的自己的类路径发现从父加载器加载。由于了com.sun.xml
这不就是硬codeD名单上不会被委派到父,因此会给你一个 ClassNotFoundException的
。
With fork="false"
the <java>
task uses a special "isolated" classloader that loads classes only from the task's own classpath (the classpathref
attribute or <classpath>
nested element), except for a specific set of hard-coded package prefixes which it will attempt to load from the parent loader if they are not found on the task's own classpath. Since com.sun.xml
isn't on this hard-coded list it will not be delegated to the parent and so will give you a ClassNotFoundException
.