| | |
Building the Project Zero Core within Eclipse
You can set up your environment to build the Project Zero core libraries. This article provides the steps necessary to set up to build the existing Project Zero core libraries.
If you want to develop Project Zero applications or new Project Zero libraries see the Project Zero Getting Started Guide. To set up your environment to build the Project Zero core libraries, use the following steps:
- Install the Java SE Development Kit (JDK) 5.0
Note: IBM employees should use the IBM internal site for downloading the JDK.
- Download the Eclipse 3.3 SDK (or later) from eclipse.org
Note: The Eclipse distribution must include the Plugin Development Environment (PDE).
Note: Eclipse must be started with version 5.0 of the JDK or download errors will occur.
- Reference the bin directory of the 5.0 JDK in your PATH environment variable (appearing before any other Java installation). If you do not want to include the 5.0 JDK in your path, then you can start eclipse with a VM argument like:
eclipse -vm <path_to_your_JDK>\bin\javaw
Note: Use '/' for UNIX-based file systems.
b. To verify that the correct version of Java is in your PATH, type java -version.
- Start eclipse, close the welcome screen, and click Window > Open Perspective > Java to change to the Java perspective.
- Change your installed JRE from the Eclipse interface:
- Click Window > Preferences...
- In the Preferences window, from the left navigation tree, click Java > Installed JREs.
- In the Installed JREs panel to the right, click Add... to add the (version 5.0 or higher) JRE that you installed.
- In the Add JRE panel, give the new JRE a name like IBM J5 SDK and click Browse... to locate the install directory of the JRE.
- Click Add External JARs to find and add the
tools.jar file to the JRE system libraries.
- Select the JRE that you added and click Edit....
- Click Add External JARs... and browse to the
lib directory of the JRE that you installed.
- Select the
tools.jar file and click Open. Then click OK twice to apply the JRE settings.
- Change the Java compiler setting from 1.4 to 5.0 (if it is not already set to 1.5) from the Eclipse interface:
- Click Window > Preferences.
- In the Preferences window, from the left navigation tree, click Java > Compiler.
- In Compiler panel to the right, check the Compiler Compliance Level drop-down from field. If it is set to 1.4, change it to 5.0.
- Click OK if Eclipse prompts you to recompile everything.
- Change the compiler output and source folders for the Java build path from the Eclipse interface:
- Click Window > Preferences.
- In the Preferences window, from the left navigation tree, click Java > Build Path.
- Click the Folders radio button and change the Source Folder Name (from
src) to java and change the Output folder name (from bin) to classes.
- Click OK.
- Install the Project Zero plug-in through the update site from the Eclipse interface:
- Click Help > Software Updates > Find and Install ....
- Click Search for new features to install and click Next >.
- Click New Remote Site ....
- Enter a name like Project Zero Core Site and enter http://www.projectzero.org/update/zero.eclipse.latest for the URL.
- Click Finish.
- Click the update site that you just created and, under the Project Zero category, find and check the Project Zero Feature 1.0.0XXX feature.
- Click Next.
- Accept the license agreement, click Next and then click Finish.
- Click Install All and then click No when prompted to restart Eclipse.
- Install Subclipse (the Eclipse plug-in for subversion) from the Eclipse interface:
- Click Help > Software Updates > Find and Install...
- Click Search for New Features to Install and click Next.
- Click New Remote site.
- To set up the Subclipse update site, enter a name like Subclipse and enter http://subclipse.tigris.org/update_1.2.x for the URL.
- Click Finish.
- Check the new Subclipse plug in and click Next.
- Be sure the Mylar/Mylyn support is not selected unless you also want to install the Mylyn plug-in.
- Click the radio button indicating that you agree to the license and click Next.
- Click Finish to agree to the location.
- In the pop up dialog that displays the features, click Install All and click Yes when Eclipse prompts you to restart.
- Configure the Subclipse plug-in to pull from the Java Zero repository:
- Click Window > Open Perspective > Other...
- Click SVN Repository Exploring.
- Right click in the project tree and click New > Repository Location....
- Enter https://www.projectzero.org/svn/zero in the URL field and click Finish.
- Enter your Project Zero user name and password when prompted and click the Save Password box so that you are not prompted for this information repeatedly.
Note: Be sure you have registered and accepted the license agreement to access the plug-in.
- Choose the projects you need:
- Navigate to the
trunk/CORE directory.
- Right-click on the projects that you need, one at a time, and click checkout for each. The following projects are needed:
- zero.build
- zero.tools
- zero.eclipse.dependencies
- Any other libraries you will need for example, zero.core and zero.data
- Follow the prompts and either accept the defaults or specify a different revision or workspace path and click Finish.
- Install the latest Subversion client. Note that this is not the same as the Subclipse Eclipse plug-in:
- Download the Subversion client from the following location: http://subversion.tigris.org/project_packages.html#binary-packages
- Verify that the SVN executable is included.
- Click Window>Preferences>Project Zero. Uncheck the Enable zerohome Ant property at the bottom of the preference page.
- Change back to the Java Perspective to build the zero CORE. Right-click zero.build/build.xml and click Run as... > Ant Build. The tools CLI zip file will be written to
zero.build/target/zero-${version}-bin.zip. The libraries will be published to zero.build/repository.
- If you are also building the Eclipse plug-in (zero.eclipseui), then you need to add the
build_eclipse target to your ant launch configuration and check out all zero.eclipse* projects:
- Right-click zero.build/build.xml and click Run As > Ant Build ....
- In the Targets tab, check the build_eclipse target and verify that it is after build in the order it is targeted to run.
- Fix any eclipse errors from the Eclipse environment:
- Click Project > Clean...
- Select the projects (choose all projects to rebuild everything) and click File > Refresh (F5).
|
r9 - 21 Nov 2007 - 18:17:34 - AntPhill
|
|
|
| | |