Summary: | JUnit classloading Broken | ||
---|---|---|---|
Product: | Ant | Reporter: | Jamie Lawson <jrlawson> |
Component: | Core tasks | Assignee: | Ant Notifications List <notifications> |
Status: | RESOLVED DUPLICATE | ||
Severity: | critical | CC: | jrlawson |
Priority: | P3 | ||
Version: | 1.5 | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All |
Description
Jamie Lawson
2002-07-18 01:23:06 UTC
In AntClassLoader(ClassLoader parent, Project project, Path classpath, boolean parentFirst) the package prefixes of jre packages are set. Changing the code to addJavaLibraries(); // addSystemPackageRoot("java"); // addSystemPackageRoot("javax"); solved the problem. But perhaps there still was a reason for commenting out the call to addJavaLibraries? There is also a bug (one dot too many) in JavaEnvUtils.buildJrePackages(), called from addJavaLibraries, in the default branch of the switch statement, which lead to a ClassNotFoundException for sun.**. Joachim: We havent turned the addLibraries() on for ant1.5 as it went in too late for rigorous testing, so it was left off, but left in there for people in emergencies. I might just turn it on now in the 1.6alpha to see what happens. Corrected the "sun." to "sun", though, since we just use indexOf, it may be better to go the other way and have sun., java. javax., etc in the list. Jamie. One change from 1.4.1 to 1.5 is the move to xerces over crimson. we did find some funnies with locating xml parsers in the betas, but thought we had fixed them with a modification of the manifest of ant.jar What happens if you fork junit? |