Eclipse: Set up project and example extension from git sources
Jump to navigation
Jump to search
Download and install eclipse (if not already available)
- Download and unzip from
- https://www.eclipse.org/downloads/packages/
- either
- Package for Enterprise Java and Web Developers
- Package for Java Developers
- each will do fine for OJ development
All the below was tested with eclipse version 2024.06.
Import into eclipse IDE
NOTE: The file system paths below are for windows but can analogous be some unix/linux/mac paths.
- Start the eclipse application
- Create and open a new workspace e.g. C:\workspace-OpenJUMP
- File > Import...
- Git > Projects from Git (with smart import) ; Next>
- Clone URI ; Next>
- enter URI https://github.com/openjump-gis/openjump.git ; Next>
- make sure at least branch main is selected ; Next>
- choose a location for the project folder e.g. C:\workspace-OpenJUMP\OpenJUMP ; Next>
- eclipse will now clone the git repository into the project folder
- Import Projects dialog pops up
- Folder OpenJUMP should be preselected Import as Maven
- Finish>
eclipse should now build the maven project without errors (warnings can be ignored)
Create a run configuration
When the project builds fine you will need to provide some information to be able to run OJ directly from the built project.
- Run > Run Configurations...
- Right click Java Application on the left side ; Select New Configuration
- change Name above tabs from
New Configuration
to
OpenJUMP - tab Main
- make sure Project is
OpenJUMP - add Main Class
com.vividsolutions.jump.workbench.JUMPWorkbench
- make sure Project is
- tab Arguments
- add Program arguments
-default-plugins scripts\default-plugins.xml -extensions-directory "lib\ext" -extensions-directory "target\lib.ext.core" -extensions-directory "target\lib.ext.plus" -I18n en_US -v info
NOTE: you can
change the language/region with the parameter -I18n or
raise the log verbosity to debug with -v or
remove -extensions-directory "target\lib.ext.plus" to simulate OJ CORE - add VM arguments
-Djava.system.class.loader=com.vividsolutions.jump.workbench.plugin.PlugInClassLoader
- add Program arguments
- save configuration with button Apply (bottom right)
- run configuration with button Run (bottom right)
eclipse should now start OJ