<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://ojwiki.soldin.de/index.php?action=history&amp;feed=atom&amp;title=How_to_create_a_jar_plugin_in_ECLIPSE</id>
	<title>How to create a jar plugin in ECLIPSE - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://ojwiki.soldin.de/index.php?action=history&amp;feed=atom&amp;title=How_to_create_a_jar_plugin_in_ECLIPSE"/>
	<link rel="alternate" type="text/html" href="https://ojwiki.soldin.de/index.php?title=How_to_create_a_jar_plugin_in_ECLIPSE&amp;action=history"/>
	<updated>2026-11-06T17:15:25Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.5</generator>
	<entry>
		<id>https://ojwiki.soldin.de/index.php?title=How_to_create_a_jar_plugin_in_ECLIPSE&amp;diff=310&amp;oldid=prev</id>
		<title>Mentaer: Created page with &#039;If you have created your HelloWorldPlugIn like in the  section How to make your plugin in ECLIPSE then you can use it by creating a &#039;&#039;jar&#039;&#039; library. This method is a good way…&#039;</title>
		<link rel="alternate" type="text/html" href="https://ojwiki.soldin.de/index.php?title=How_to_create_a_jar_plugin_in_ECLIPSE&amp;diff=310&amp;oldid=prev"/>
		<updated>2009-10-18T20:34:59Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;#039;If you have created your HelloWorldPlugIn like in the  section &lt;a href=&quot;/index.php?title=How_to_make_your_plugin_in_ECLIPSE&quot; title=&quot;How to make your plugin in ECLIPSE&quot;&gt;How to make your plugin in ECLIPSE&lt;/a&gt; then you can use it by creating a &amp;#039;&amp;#039;jar&amp;#039;&amp;#039; library. This method is a good way…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;If you have created your HelloWorldPlugIn like in the  section [[How to make your plugin in ECLIPSE]] then you can use it by creating a &amp;#039;&amp;#039;jar&amp;#039;&amp;#039; library. This method is a good way if you want to deploy your plugin but is somehow a bad way for testing your plugin code on errors. For the latter case see this section: [[How to use a plugin with a properties file in ECLIPSE]].&lt;br /&gt;
&lt;br /&gt;
But let&amp;#039;s start on how to create a jar file in Eclipse:&lt;br /&gt;
&lt;br /&gt;
* 1 - First thing we have to do is create a Jump Extension class. Therefore we right-mouse-click on our &amp;#039;&amp;#039;Helloi18&amp;#039;&amp;#039; project folder and create a new class HelloWorldExtension. The xxxExtension class is a class  of type &amp;#039;&amp;#039;Extension&amp;#039;&amp;#039; which has to be realized by adding: &amp;#039;&amp;#039;&amp;#039;extends Extension&amp;#039;&amp;#039;&amp;#039; (see picture below)&lt;br /&gt;
&lt;br /&gt;
* 2 - The class must hold a method called &amp;#039;&amp;#039;configure()&amp;#039;&amp;#039; which is called by OpenJUMP. In this method we put a line to call the &amp;#039;&amp;#039;initialize()&amp;#039;&amp;#039; method of our xxxPlugIn class.&lt;br /&gt;
Example code for the HelloWorldExtension class is given below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * created on 		04.10.2005&lt;br /&gt;
 * last modified: 	&lt;br /&gt;
 * &lt;br /&gt;
 * author:			sstein&lt;br /&gt;
 * &lt;br /&gt;
 *************************************************/&lt;br /&gt;
package ch.unizh.geo.degen;&lt;br /&gt;
&lt;br /&gt;
import com.vividsolutions.jump.workbench.plugin.Extension;&lt;br /&gt;
import com.vividsolutions.jump.workbench.plugin.PlugInContext;&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * @description&lt;br /&gt;
 *  - this class loads the PlugIn into Jump &amp;lt;p&amp;gt;&lt;br /&gt;
 *  - class has to be called &amp;quot;Extension&amp;quot; on the end of classname&lt;br /&gt;
 *    to use the PlugIn in Jump&lt;br /&gt;
 * &lt;br /&gt;
 *  @author sstein &lt;br /&gt;
 */&lt;br /&gt;
public class HelloWorldExtension extends Extension{&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * calls PlugIn using class method xplugin.initialize() &lt;br /&gt;
	 */&lt;br /&gt;
	public void configure(PlugInContext context) throws Exception{&lt;br /&gt;
		new HelloWorldPlugIn().initialize(context);&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[File:7helloextension.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note&amp;#039;&amp;#039;&amp;#039;: A number of different plugins can be initialized by one extension class. That means one can call several &amp;#039;&amp;#039;initialize()&amp;#039;&amp;#039; method from several PlugIn classes after each other.&lt;br /&gt;
&lt;br /&gt;
* 3 - Now we can create our &amp;#039;&amp;#039;jar library&amp;#039;&amp;#039;. Therefore right-mouse-click on your &amp;#039;&amp;#039;Helloi18&amp;#039;&amp;#039; project folder and choose the Menu Entry &amp;#039;&amp;#039;&amp;#039;Export...&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
[[File:8jarexport.png]]&lt;br /&gt;
&lt;br /&gt;
* 4 - In the following dialog select &amp;#039;&amp;#039;&amp;#039;JAR file&amp;#039;&amp;#039;&amp;#039; and click &amp;#039;&amp;#039;&amp;#039;next&amp;#039;&amp;#039;&amp;#039;. Now choose the options similar like I did in the screenshot below and specify the name and the path of your output file. Finally click on &amp;#039;&amp;#039;&amp;#039;Finish&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
[[File:9writejar.png]]&lt;br /&gt;
&lt;br /&gt;
* 5 - As you see I have chosen directly the folder &amp;#039;&amp;#039;\openjump\lib\ext&amp;#039;&amp;#039; which is the final place if  you want use the plugin. So if you create the jar file somewhere else then copy it into the &amp;#039;&amp;#039;\openjump\lib\ext&amp;#039;&amp;#039; folder. &lt;br /&gt;
&lt;br /&gt;
* 6 - Afterwards start OpenJUMP. If you copy the jar file into  the &amp;#039;&amp;#039;\ext&amp;#039;&amp;#039; folder and Jump is already running, then the new plugin will not be recognized - this happens only on program (OpenJUMP) start.&lt;/div&gt;</summary>
		<author><name>Mentaer</name></author>
	</entry>
</feed>