0

I've read similar questions but I still don't have all the pieces together.

Is it possible (and if yes how) to start an Apache Felix based OSGi desktop application via Java Web Start?

My main concern is that you have to specify the bundles somewhere in JNLP file if you want to enable the update checks of Web Start (which is a requirement). But the only thing I see that could help is a jar resource. But this would just add jars to the classpath, not starting them as bundles.

Any ideas?

Puce
  • 37,247
  • 13
  • 80
  • 152

1 Answers1

1

Right, any JARs you list in the JNLP will simply be put on the classpath. There is no way to get Web Start to install them as bundles, because Web Start knows nothing about OSGi.

You could use Web Start to kick off a small launcher application, which consists of just the OSGi Framework and a "management agent" of some kind. That management agent could then use other means (e.g. OBR) to install and update bundles from a repository.

This approach would also help you to eventually migrate from Web Start entirely, which would be for the best since Web Start is obsolete and may not even be supported in future versions of Java.

Neil Bartlett
  • 23,743
  • 4
  • 44
  • 77
  • Can you point me to the statement which mentions Web Start is obsolete? That would be a new information for me. It's one of the standard ways how to provide rich clients for Java EE applications and even JavaFX comes with special Web Start extensions. – Puce May 16 '13 at 07:53
  • Of course you're not going to find an official Oracle statement to that effect. This is my opinion based on observed industry trends... I'm as surprised to hear somebody talking about a new system based on Web Start as I would be to hear them talk about Powerbuilder or Delphi. – Neil Bartlett May 16 '13 at 11:15
  • As for not supporting in future Java versions... Oracle is feeling a lot of pain from security issues related to two parts of Java that almost nobody uses: Web Start and Applets. For example this was cited as the reason for the delay in shipping Java 8. They already offer "server editions" of Java that leave out WS and the browser plugins, it's only a matter of time before that edition becomes the standard one. – Neil Bartlett May 16 '13 at 11:19
  • AFAIK the security issues mainly come from the plugin. You don't have to use the plugin to use Web Start AFAIK. What else would you suggest which has similar features to deploy Java EE rich clients (platform independent, desktop icon, update check, no other server needed apart from a web server...)? Of course there are app stores for some platforms, but then not all platforms have. And you don't want to deploy internal apps to a public app store. – Puce May 16 '13 at 13:13
  • Sure, just install a Java program that connects to an OSGi repository and installs bundles. You're going to need most of this anyway since (to get back to the actual posted question) Web Start only works for updating JARs on the classpath. – Neil Bartlett May 16 '13 at 20:42