I’m trying to create a single executable JAR for a legacy OSGi desktop application.
Context
Application: OSGi/Equinox
Runtime: Java 8
I cannot use Bndtools UI in Eclipse. I think it doesn’t support for java 8.
I have biz.aQute.bnd-6.4.1.jar avaible.
What I did
I created a config.bndrun based on my existing Equinox config.ini configuration.
I collected all bundles that my application uses (from my runtime/plugins), and put them into a “plugins/“ folder keeping their original names-versions.
It is based on Equinox/OSGi, but not using the Eclipse RCP UI framework. It is a custom desktop application built on top of Equinox. Is there any other way for creating an executable jar for our project. We can’t use bnt tools on Eclipse for our project, right?
So, even though my project is Java8, I can still install the latest BNDTools file and get the FAT JAR, right? What steps should I follow to do this? How do I configure Launcher 6.4.1? Should I use the existing launcher JAR file instead? Can you explain it step-by-step? I’m new to this
Regarding your question on Java 8.
Yes. You can use the latest and greated bndtool version and still produce Java8 compatible bundles and executables.
This repo and project is creating Java 8 compatible bundles.
Mind the usage of the javac.*settings inside the bnd.bnd file.
The mvn-deploy-bnd.bndrunin the same repo is used for creating the executable jar for Java 8.