? out.diff Index: src/org/netbeans/modules/java/j2seproject/classpath/BootClassPathImplementation.java =================================================================== RCS file: /cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/classpath/BootClassPathImplementation.java,v retrieving revision 1.14 diff -u -r1.14 BootClassPathImplementation.java --- src/org/netbeans/modules/java/j2seproject/classpath/BootClassPathImplementation.java 1 Oct 2007 14:22:53 -0000 1.14 +++ src/org/netbeans/modules/java/j2seproject/classpath/BootClassPathImplementation.java 14 Jan 2008 04:26:29 -0000 @@ -50,9 +50,12 @@ import org.netbeans.api.java.classpath.ClassPath; import java.beans.PropertyChangeListener; import java.beans.PropertyChangeSupport; +import java.io.File; import java.util.List; import java.util.ArrayList; import java.util.Collections; +import java.util.Iterator; +import org.netbeans.spi.java.project.classpath.support.ProjectClassPathSupport; import org.netbeans.spi.project.support.ant.PropertyEvaluator; import org.openide.util.WeakListeners; @@ -87,16 +90,34 @@ currentId = eventId; } - JavaPlatform jp = findActivePlatform (); - final List result = new ArrayList(); - if (jp != null) { - //TODO: May also listen on CP, but from Platform it should be fixed. - final ClassPath cp = jp.getBootstrapLibraries(); - assert cp != null : jp; - for (ClassPath.Entry entry : cp.entries()) { - result.add(ClassPathSupport.createResource(entry.getURL())); + final List result = new ArrayList(); + + // does the user override bootclasspath? + String bootcp = evaluator.getProperty("bootclasspath"); + if (bootcp == null || bootcp.trim().equals("")) { + JavaPlatform jp = findActivePlatform (); + + if (jp != null) { + //TODO: May also listen on CP, but from Platform it should be fixed. + final ClassPath cp = jp.getBootstrapLibraries(); + assert cp != null : jp; + for (ClassPath.Entry entry : cp.entries()) { + result.add(ClassPathSupport.createResource(entry.getURL())); + } } } + else { + File basedir = new File(evaluator.getProperty("basedir")); + ClassPathImplementation cpi = ProjectClassPathSupport.createPropertyBasedClassPathImplementation( + basedir, evaluator, new String[] {"bootclasspath"}); + + Iterator resources = cpi.getResources().iterator(); + while (resources.hasNext()) { + PathResourceImplementation pri = (PathResourceImplementation)resources.next(); + result.add(pri); + } + } + synchronized (this) { if (currentId == eventId) { Index: src/org/netbeans/modules/java/j2seproject/resources/build-impl.xsl =================================================================== RCS file: /cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/resources/build-impl.xsl,v retrieving revision 1.108 diff -u -r1.108 build-impl.xsl --- src/org/netbeans/modules/java/j2seproject/resources/build-impl.xsl 15 Nov 2007 15:24:31 -0000 1.108 +++ src/org/netbeans/modules/java/j2seproject/resources/build-impl.xsl 14 Jan 2008 04:26:30 -0000 @@ -289,6 +289,10 @@ ${javac.classpath} + bootclasspath + + + includes ${includes} @@ -311,6 +315,7 @@ @{srcdir} + ${bootclasspath} @{sourcepath} @{destdir} @{debug}