Preparing projects, folders and files.

Version 1

    Go to into the ~/sources/jdk8_tl/jdk/make/ folder and copy the netbeans folder and call it eclipse. Similarly go into the ~/sources/jdk8_tl/langtools/make/ folder and copy the netbeans folder and call it eclipse.

    Then go to the individual folders and rename the nbproject to ecproject wherever applicable. Remove the contents of this folder.

    Open ~/sources/jdk8_tl/jdk/make/eclipse/common/shared.xml in a text editor, go to lines 130 and 132 and replace 1.5 and 1.6 to ${javac.version.source} and ${}. This will eventually be replaced in each of the individual files for each of the packages as shown below.

    Iterate through the below folders to look for the "build.xml" and "" files, if either of them do not exist, create the file:

     ~/sources/jdk8_tl/jaxp/ ~/sources/jdk8_tl/jaxws ~/sources/jdk8_tl/jdk/make/eclipse/j2se/ ~/sources/jdk8_tl/jdk/make/eclipse/jconsole/ ~/sources/jdk8_tl/jdk/make/eclipse/jmx/ ~/sources/jdk8_tl/jdk/make/eclipse/swing/ ~/sources/jdk8_tl/langtools/make/eclipse/langtools/ 

    Ensure the build.xml scripts have Ant tasks in each of them.

    Otherwise create them taking the build script at ~/sources/jdk8_tl/jdk/make/eclipse/swing/build.xml as an example. For one of the packages the Ant Task does exist but it is surrounded by comments, and would require uncommenting.

    Look for the ‘javac’ tag in this file, a typical Ant task looks like the below:


         <target name="run" depends="-init"> <property name="jvm.args" value=""/> <javac srcdir="${swing.demo.src}" destdir="${swing.demo.classes}" fork="true" failonerror="true" classpath="${dist.dir}/lib/swing.jar:${classes.dir}" debug="${javac.debug}" debuglevel="${javac.debuglevel}"> <compilerarg line="${javac.options}"/> </javac> <java classname="SampleTree" classpath="${swing.demo.classes}" fork="true" failonerror="true" jvm="${bootstrap.jdk}/bin/java"> <jvmarg line="${demo.bootclasspath}"/> <arg line="${jvm.args}"/> </java> </target> 


    Search and replace all references to the texts “netbeans” and “nbproject” in the above files, to “eclipse” and “ecproject” respectively (without the quotes).

    Amend the build.xml scripts to include source files, output and distribution folders (optional).

    Also insert the following line at the top of the build.xml file just under the tag for all the above build.xml files:


       <property name="" location="./"/> 


    After importing the above packages, change the JRE version of the build.xml for each of the packages from 1.6 to 1.7 by using the right-mouse-click,

    Ant-EditConfiguration (1.6 to 1.7)

    select the menu option Run As > Ant Build…, select the JRE tab, select java-7-openjdk-amd64 from the list next to Separate JRE.


    From within all the build.xml files remove references to the -demo-init, shared-clean, etc… defined with the depends attribute in the tags. Alternatively create dummy ones in each of the script where required in order to validate them sucessfully.

    Amend the Ant Task attached to the build.xml by opening the Ant properties page and checking the ‘clean’ task and reording the build and clean taks in the following order, by using the Order button:


     clean or shared-clean build 


    Now individually import these projects into Eclipse (after ensuring both Java and C/C++ projects can be loaded into Eclipse) after making amendments to the file for the relevant projects.

    NewProject (Import project from Ant Build script)

    NewJavaProject (next screen)