From Protege Wiki
Jump to: navigation, search


Setup and Run P4.x in IntelliJ

This page describes the simple steps required to setup P4.x for development in jetbrains IntelliJ.

Back to Protege4DevDocs

Check out sources

Use an SVN client to checkout the Protege 4 trunk from SVN to a local directory (say trunk).

   svn co trunk

If using IntelliJ to checkout the sources and it prompts you to create a new project, select No.

Create the IntelliJ project files

Matthew Horridge has created a very easy to use tool to create a nice tidy intelliJ project. You can download this from here.

  • Open a command line
  • Change directory into trunk
   cd trunk
  • Run the command line tool (notice the current path - dot - is a parameter)
   java -jar Protege4IntelliJProjectBuilder.jar .
  • Open the project in IntelliJ

You should now have a multi-module project containing the various pieces of the core and owl editor, as well as several plugins that are part of the default distribution (DL Query, OWLViz, pellet and FaCT++)


Build the project the usual way. Some versions of IntelliJ may complain that the directory could not be created. Just try again and it should be built.

Build products are placed into the build/dist/equinox directory, which is in the Protege trunk directory.


You can add a run configuration by specifying the following settings:

 Main class: org.eclipse.core.runtime.adaptor.EclipseStarter
 VM parameters: -Dosgi.clean=true
 Working directory: <PATH TO PROTEGE TRUNK>/build/dist/equinox
 Use classpath and JDK of module: runtime

See the screen shot below. It is particularly important that the working directory is set to be the equinox build directory and that the class path and JDK module be set to runtime.



On running, if you have errors in your log window, check that a logs/ directory exists in the equinox directory. If not, create an empty one.

Also, log4j.xml should exist in the equinox directory. If it does not then copy it from the root of your source directory.