How to use JavaFX Preloader with stand-alone application in Eclipse?

This is a long answer, the quick answer for the impatient is to download this sample code for displaying a splash page for an intensive startup task and see if it is adaptable to your situation. My answer provides general information about Preloader style functionality in JavaFX. Your question specifically mentions Preloader usage in an … Read more

Programmatically Start OSGi (Equinox)?

Any OSGi framework (R4.1 or later) can be started programmatically using the FrameworkFactory API: ServiceLoader<FrameworkFactory> ffs = ServiceLoader.load(FrameworkFactory.class); FrameworkFactory ff = ffs.iterator().next(); Map<String,Object> config = new HashMap<String,Object>(); // add some params to config … Framework fwk = ff.newFramework(config); fwk.start(); The OSGi framework is now running. Since Framework extends Bundle you can call getBundleContext and call … Read more

What does OSGi solve?

what benefits does OSGi’s component system provide you? Well, Here is quite a list: Reduced Complexity – Developing with OSGi technology means developing bundles: the OSGi components. Bundles are modules. They hide their internals from other bundles and communicate through well defined services. Hiding internals means more freedom to change later. This not only reduces … Read more

Reading my own Jar’s Manifest

You can do one of two things: Call getResources() and iterate through the returned collection of URLs, reading them as manifests until you find yours: Enumeration<URL> resources = getClass().getClassLoader() .getResources(“META-INF/MANIFEST.MF”); while (resources.hasMoreElements()) { try { Manifest manifest = new Manifest(resources.nextElement().openStream()); // check that this is your manifest and do what you need or get the … Read more