CompileProtege4InEclipse
Compile and Run Protege 4.0 Alpha from Eclipse
To follow is some documentation for compiling and running Protege 4.0 alpha from the Eclipse development environment. This documentation takes the approach of creating a separate Eclipse project for each OSGi bundle in the Protege 4 source tree.
Please note that:
- These instructions are only valid for the 4.0 alpha version of Protege. If you want to compile and run the 3.x versions of Protege, we have separate instructions available elsewhere.
- This is only one of several possible ways of compiling and running Protege 4 from Eclipse. This particular page is not meant to be exhaustive.
Contents
Create the org.protege.common
project
Go to the SVN Repository Exploring perspective and navigate to protege4/protege-standalone/trunk/plugins/org.protege.common
. This step assumes that you have Subversion support installed for the Eclipse IDE and that you have already connected to the Protege Subversion repository. If you have not done this, we have instructions for doing so on our Wiki.
Right-click on the org.protege.common
folder and choose Checkout... In the resulting "Checkout from SVN" dialog, leave all of the default settings (as shown below) and click Finish.
In the "New Project" dialog, choose Plug-in Project and click Next >.
In the "New Plug-in Project" dialog, type org.protege.common
in the Project name text box. Leave the default settings in the Project Settings and Target Platform sections. For this documentation, we will also use the default location for the project. Click the Next > button.
For the Plug-in Content section, uncheck both of the checkboxes in the Plug-in Options section and leave all other default settings.
If you are curious about what any of these settings mean, you can click the question mark (help) icon in the lower-left corner of the New Project Plug-in dialog and browse the Eclipse documentation.
Click the Finish button. At this point, Eclipse will ask you if you want to use the Plug-in Development perspective for your project:
Check the "Remember my decision" checkbox and click the Yes button. Then, click OK if you see a "Confirm Overwrite" dialog. Eclipse will now begin checking out the source code for the org.protege.common
bundle. Your Package Explorer will look something like the following after the checkout is complete:
If you have Project | Build Automatically turned on, you will notice compiler errors after checking out the source code. To fix them, right-click on the org.protege.common
and bring up the Properties dialog. Go to the Libraries tab in the Java Build Path section. Click the Add Jars... button and add all the JAR files that are in the org.protege.common/lib
directory: