Taming Cheetah
Starting with 02-Jul-2004, the JDK 1.5 branch of the jdt.core plug-in was merged back to HEAD and development will continue in HEAD. So you will not get get the lastest version if you check out the 1.5 branch. For jdt.ui and jdt.debug nothing has been decided yet.
Out of the box, Eclipse 3.0 does not support Java's new language features like generics, autoboxing and enhanced for loop. However, support for these features is actively developed and you can watch its progress and use what is available today.
This tutorial explains
- how to use Eclipse to download the Java 1.5 support (code named Cheetah) directly from CVS,
- how to run Eclipse with Cheetah, and
- how to keep your Cheetah version up to date.
Requirements
- You need Java 1.5. The JRE is sufficient but if you don't mind the larger download, we recommend to use the SDK for serious development.
- You need Eclipse 3.0 M9 or better. While not official supported, it should run under Java 1.5. If not, you need an 1.4.2 JRE to run Eclipse. Use command line option
-vm c:/j2sdk1.4.2/bin/javaw
to pass a reference to the VM when starting Eclipse.
Load Source Code from CVS Repository
You will use the CVS import wizard to download the source code into your workspace.
- Run Eclipse 3.0
- If not done yet, you should set a CVS compression level to speed up CVS communication. Choose Window|Preferences... from the main menu and navigate via Team to CVS. Set the Compression level to
6
. Then press OK to save the preferences.
- Choose Import... either from the main menu or the Navigator's or Package Explorer's context menu. The Import wizard opens.
- Select Checkout Projects from CVS. Then press Next.
- If this is not the first time you use the wizard, a list of previously used repository locations is displayed. Click the Use existing repository location radio button and select
:pserver:anonymous@dev.eclipse.org:/home/eclipse
and skip the next step or click the Create a new repository location radio button and proceed with the next step. Press Next.
- Enter
dev.eclipse.org
as Host. Enter /home/eclipse
as Repository path. Enter anonymous
as User. You can leave all other fields blank. Make sure that the Connection type is pserver
. Press Next.
- Choose radio button Use an existing module. Wait for the tool to populate the tree view. The search for org.eclipse.jdt.core. When found, select it and press Next.
- Verify, that Check out as a project in the workspace is selected. The default should be fine. Press Next.
- Again, keep the default. Then press Next.
- Now select
Branches
in the Select tag list view and press Refresh from Repository. Wait for the tool to retrieve the information from the CVS server. Then open the Branches item, search for JDK_1_5
and select it. Press Finish when you're ready to download the source code.
- The source code is checked out from the repository, downloaded, and compiled...
- Repeat the above steps to also import the projects
org.eclipse.jdt.ui
and org.eclipse.jdt.debug
.
- You're done.
Run the New Eclipse Workbench
You will use the Java laucher to start a new Eclipse workbench and configure it for Java 1.5.
- If not done yet, switch the perspective to Java. Click on and choose
Java
from the perspectives list. Or choose Window|Open Perspective|Java from the main menu.
- Select the
org.eclipse.jdt.core
project in the Package Explorer.
- Click on arrow left to to open the buttons context menu. Then choose Run As|Run-time Workbench. Or choose Run|Run As|Run-time Workbench from the main menu.
- Eclipse will start a second workbench, which may take some time...
- To open the preferences of the new workbench, choose Window|Preferences... from the main menu. Then via Java to Compiler. Select the Compliance and Classfiles tab. Set the Compiler compliance level to
1.5
. Also check the Use default compliance settings. Press Apply to save the settings. Do not close the preferences window yet.
- Verify that Java 1.5 is the default JRE. Navigate to Installed JREs. Add the Java 1.5 JRE or SDK to the list of installed JREs and select it to use it as default JRE. Press OK to save the settings and close window.
- Eclipse wants to perform a Full Build now, even if there's nothing to build yet.
- The new Eclipse workbench is now ready to use.
Keep Cheetah up-to-date
- Run Eclipse.
- Switch to the Java perspective.
- Select the
org.eclipse.jdt.core
project in the Package Explorer.
- Choose Team|Synchronize with Repository... from the Package Explorer's context menu.
- Eclipse wants to switch to the Team Synchronizing perspective. Press Yes to allow this.
- Press in the Synchronize view to start a synchronization. If there are changes pending, you can check them out and eventually update your project.
If you find bugs in Cheetah (and there are bugs) then please enter a bug report for JDT Core, prefixing the subject line with [1.5]
to help the Eclipse/JDT guys.
Stefan Matthias Aust