Develop own OpenJUMP PlugIn with Eclipse
The initial side where I started
This link on the side didn’t help, so I searched for another tutorial on how to set up OpenJUMP in Eclipse…
Setup OpenJUMP in Eclipse
Additionals for the video:
– download older version ‘openjump-src-1.4.2’
– the text that the tutor enters to ‘Run Configuration’
-plug-in-directory lib/ext -properties ./scripts/workbench-properties.xml -Dorg.xml.sax.driver=org.apache.xerces.parser.SAXParser -Dswing.defaultlaf=javax.swing.plaf.metal.MetalLookAndFeel -Dlog4j.configuration=file:./etc/log4j.xml -Duser.language=ml
(leaf out the last line, as it is the language of the tutor)
Making a first HelloWorldPlugIn
…still using information on this side!
!Make sure the filename ends with ‘PlugIn’…with a majuscel ‘I’…it is case sensitive!!!
The described instructions can be applied without any additions!!!
Running the first PlugIn
…still on this side!
Version 1 works easily.
Exporting a *.jar file has to be done this way…(!Before you have to create the new ‘Extension file, as described’!)
right click on folder ‘Helloi18n/src’ … ‘Export…’ … ‘Java/Jar file’ … only export all ‘src’ resources … select destination … ‘Finish’
now you only have to put this *.jar file into the plugin folder of OpenJUMP –‘> for me: /home/klammer/osm/bin/openjump-bin-1.4.1/lib/ext
Version 2 is also simple, but you have to made more editing!
It is a note to have OpenJUMP as seperate project…I did so as described above!!!
–> the workbench-properties.xml looks in my case this way:
<workbench> <plug-in>tudresden.klammer.HelloWorldPlugIn</plug-in> </workbench>
…and has to be stored in the project of the HelloWorldPlugIn
–> I already have a run entry…cause I followed the descriptions above…so I have to change this one …ergo … change the ‘Run Configurations’ again
!!!it is necessary to remove the ‘Program arguments’ that I have added before…replace them with the new one…which are for me:
-> that points to the properties file stored in the PlugIn project
-> that points to the OpenJUMP set up in Eclipse (as described above)
–> Point 5 is described very complicated but is not so
…just go to the ‘classpath’ tab of the ‘Run Configuration’ … click on ‘Bootstrap Entries’ and add all jar files of the OpenJUMP project ‘lib’ folder
…and click on ‘user entries’ and add the Plugin project
Thats it…click on run…and you should find a new menu called ‘View’ containing the menuitem ‘HelloWorldPlugIn’!!!