I try to build a Eclipse plugin that has to use a self written jar which is dependent on other jars, but I don't get the point where to start with handling jars as seperate PlugIns. Anywhere I have to use just the .jar files or am I wrong?
However, the 'add external jars' button is greyed out, implying that i am not allowed to use it. Can anyone help? If your project builds with Java 9+ make sure you've selected Classpath (as shown here). You should also be able to add the JAR with right-click on the project > Build Path > Add External Archives....
Drag the jar file into the project folder in Eclipse. The jar file will now show up in the project. 2. Right click on the project after you have added the jar and select Properties.
I think I found a proper solution; the trick is that you have to implement all the files via Eclipse. I just copy here the solution which was posted to news.eclipse.platform:
Include the jars in a plugin:
Import
> File System
to import the jar files into your plugin project, say in the <project>/lib
directory.Add...
button to add the jars to the classpath section of the plugin.xml
> Runtime
tab.New...
button to add "." library back (with no quotes, of course).plugin.xml
> Build
tab.context menu
> PDE Tools
> Update Classpath
to correctly add the jars to the eclipse project classpath.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With