You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by Sebastian Heib <he...@synyx.de> on 2008/07/17 15:44:50 UTC
Java webstart - loading bundles
Hi,
I have a felix application (sip-communicator) that gets started with
webstart.
In the felix.client.run.properties file I refer to the bundles that
should be loaded at startup. Does anybody know a possibility, how I can
refer to the jars (my bundles) that webstart has downloaded? I tried the
following, but neither of them worked:
jar:file://www.mydomain.com/foo/bar.jar!/ (see
http://docs.sun.com/source/819-0913/author/jar.html#jarprotocol)
jar:http://www.mydomain.com/foo/bar.jar!/ (as documented in the javadoc,
JarURLConnection)
Sebastian
--
/**
* Sebastian Heib
* Software Developer
*
* Synyx GmbH & Co. KG
* Business in Components
* Karlstr. 68
* 76137 Karlsruhe
*
* phone +49(0)721 66 24 866
* fax +49(0)721 66 48 877
* eMail heib@synyx.de
* www http://www.synyx.de
* irc irc.synyx.de
*
* Sitz der Gesellschaft: Karlsruhe
* Registergericht: Mannheim
* Handelsregisternummer: HRA 4793
* USt-IdNr.: DE249264296
*
* Komplementärin: Elatech Verwaltungs GmbH
* Sitz der Gesellschaft: Karlsruhe
* Geschäftsführer: Markus Daniel
* Registergericht: Mannheim
* Handelsregisternummer: HRB 7250
*/
Re: Java webstart - loading bundles
Posted by Rob Walker <ro...@ascert.com>.
We've also done a similar approach to that which Richard describes.
Our web-start just brings down a very thin "launcher" JAR - this goes
back to the URL to pull down the felix.propeties, and via "variable
substitution" the bundle JARs get pulled down automatically e.g.
felix.auto.install.1="${bundle.root}/lib/ext/osgi.compendium.jar" \
For local use ${bundle.root} has a file:// URL value to load bundles
from the local file system - which is set by our command / EXE startup
wrappers
For the "shim" launcher for WebStart we make sure this property is set
in the JNLP:
<resources>
<j2se version="1.4+" href="http://java.sun.com/products/autodl/j2se"/>
<j2se version="1.4+"/>
<jar href="lib/launch.jar" main="true" download="eager"/>
<jar href="lib/felix.jar" download="eager"/>
<property name="bundle.root" value="$$context"/>
</resources>
I forget - but I think $$context uses a standard webstart servlet auto
replacement - to make the JNLP portable regardless of the mounted URL
-- Rob
Richard S. Hall wrote:
> Just a guess...
>
> I assume you have packaged everything into a single JAR file that Web
> Start downloads, including embedded bundle JARs. Could you simply do a
> getResource() specifying the path to the embedded bundle JAR and use
> the returned URL to install the bundle?
>
> -> richard
>
> Sebastian Heib wrote:
>> Hi,
>>
>> I have a felix application (sip-communicator) that gets started with
>> webstart.
>>
>> In the felix.client.run.properties file I refer to the bundles that
>> should be loaded at startup. Does anybody know a possibility, how I can
>> refer to the jars (my bundles) that webstart has downloaded? I tried the
>> following, but neither of them worked:
>>
>> jar:file://www.mydomain.com/foo/bar.jar!/ (see
>> http://docs.sun.com/source/819-0913/author/jar.html#jarprotocol)
>>
>> jar:http://www.mydomain.com/foo/bar.jar!/ (as documented in the javadoc,
>> JarURLConnection)
>>
>>
>> Sebastian
>>
>>
>>
--
Ascert - Taking systems to the Edge
robw@ascert.com
+44 (0)20 7488 3470
www.ascert.com
Re: Java webstart - loading bundles
Posted by Sebastian Heib <he...@synyx.de>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
I had all the bundles downloaded in separate JAR files. But I just
tested to put all those bundles in one big jar. To load the embedded
jars from that big jar works now.
Thanks!
Sebastian
Richard S. Hall schrieb:
> Just a guess...
>
> I assume you have packaged everything into a single JAR file that Web
> Start downloads, including embedded bundle JARs. Could you simply do a
> getResource() specifying the path to the embedded bundle JAR and use the
> returned URL to install the bundle?
>
> -> richard
>
> Sebastian Heib wrote:
>> Hi,
>>
>> I have a felix application (sip-communicator) that gets started with
>> webstart.
>>
>> In the felix.client.run.properties file I refer to the bundles that
>> should be loaded at startup. Does anybody know a possibility, how I can
>> refer to the jars (my bundles) that webstart has downloaded? I tried the
>> following, but neither of them worked:
>>
>> jar:file://www.mydomain.com/foo/bar.jar!/ (see
>> http://docs.sun.com/source/819-0913/author/jar.html#jarprotocol)
>>
>> jar:http://www.mydomain.com/foo/bar.jar!/ (as documented in the javadoc,
>> JarURLConnection)
>>
>>
>> Sebastian
>>
>>
>>
>
- --
/**
* Sebastian Heib
* Software Developer
*
* Synyx GmbH & Co. KG
* Business in Components
* Karlstr. 68
* 76137 Karlsruhe
*
* phone +49(0)721 66 24 866
* fax +49(0)721 66 48 877
* eMail heib@synyx.de
* www http://www.synyx.de
* irc irc.synyx.de
*
* Sitz der Gesellschaft: Karlsruhe
* Registergericht: Mannheim
* Handelsregisternummer: HRA 4793
* USt-IdNr.: DE249264296
*
* Komplementärin: Elatech Verwaltungs GmbH
* Sitz der Gesellschaft: Karlsruhe
* Geschäftsführer: Markus Daniel
* Registergericht: Mannheim
* Handelsregisternummer: HRB 7250
*/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIgGxrVLMsFFAgh4URAp/EAJ9W69CODTPrKuNkgvGg3oLBT3eOLgCgnvpK
aguAIbkphBrf4NEw9Pt5sdo=
=c6Rh
-----END PGP SIGNATURE-----
Re: Java webstart - loading bundles
Posted by "Richard S. Hall" <he...@ungoverned.org>.
Just a guess...
I assume you have packaged everything into a single JAR file that Web
Start downloads, including embedded bundle JARs. Could you simply do a
getResource() specifying the path to the embedded bundle JAR and use the
returned URL to install the bundle?
-> richard
Sebastian Heib wrote:
> Hi,
>
> I have a felix application (sip-communicator) that gets started with
> webstart.
>
> In the felix.client.run.properties file I refer to the bundles that
> should be loaded at startup. Does anybody know a possibility, how I can
> refer to the jars (my bundles) that webstart has downloaded? I tried the
> following, but neither of them worked:
>
> jar:file://www.mydomain.com/foo/bar.jar!/ (see
> http://docs.sun.com/source/819-0913/author/jar.html#jarprotocol)
>
> jar:http://www.mydomain.com/foo/bar.jar!/ (as documented in the javadoc,
> JarURLConnection)
>
>
> Sebastian
>
>
>