Difference between revisions of "Eclipse: Set up project and example extension from git sources"
Jump to navigation
Jump to search
Line 6: | Line 6: | ||
:: Package for Java Developers | :: Package for Java Developers | ||
: each will do fine for OJ development | : each will do fine for OJ development | ||
+ | |||
+ | All the below was tested with eclipse version 2024.06. | ||
== Import into eclipse IDE == | == Import into eclipse IDE == | ||
− | '''NOTE:''' The file system paths below are for windows but can analogous be some unix/linux/mac paths | + | '''NOTE:''' The file system paths below are for windows but can analogous be some unix/linux/mac paths. |
# Start the eclipse application | # Start the eclipse application | ||
# Create and open a new workspace e.g. ''C:\workspace-OpenJUMP'' | # Create and open a new workspace e.g. ''C:\workspace-OpenJUMP'' | ||
Line 21: | Line 23: | ||
## Folder ''OpenJUMP'' should be preselected '''Import as Maven''' | ## Folder ''OpenJUMP'' should be preselected '''Import as Maven''' | ||
## Finish> | ## 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 <br>''New Configuration''<br>to<br>''OpenJUMP'' | ||
+ | ## tab '''Main''' | ||
+ | ### make sure '''Project''' is<br>''OpenJUMP'' | ||
+ | ### add '''Main Class''' <br>''com.vividsolutions.jump.workbench.JUMPWorkbench'' | ||
+ | ## tab '''Arguments''' | ||
+ | ### add '''Program arguments'''<br>''-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''<br> '''NOTE:''' you can <br>change the language/region with the parameter '''-I18n''' or <br>raise the log verbosity to debug with '''-v''' or<br>remove ''-extensions-directory "target\lib.ext.plus"'' to simulate OJ CORE | ||
+ | ### add '''VM arguments'''<br>''-Djava.system.class.loader=com.vividsolutions.jump.workbench.plugin.PlugInClassLoader'' | ||
+ | ## save configuration with button '''Apply''' (bottom right) | ||
+ | ## run configuration with button '''Run''' (bottom right) | ||
+ | eclipse should now start OJ |
Revision as of 00:21, 2 July 2024
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