Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deploying a project remotely using Java Web Start

I am trying to deploy a project remotely using Java web start. Here it is working for a single jar file. Can anyone tell me how to deploy this for multiple jar files and as I am using SQLite DB which uses sqlite-jni.dll for its execution on windows? I need to include this file to in the JNLP.

Any kind of help will be appreciated.

Thanks in advance.

like image 738
user582776 Avatar asked Jan 27 '26 16:01

user582776


1 Answers

Put the native in the root of a signed Jar file and add it to a nativelib element in the JNLP. Since it is a DLL, make sure you add it to a Windows specific resources section.

Do you have natives for Mac. and *nix?


E.G.

<?xml version='1.0' encoding='UTF-8' ?>
<jnlp spec='1.0' codebase='http://our.com/lib/' href='our.jnlp'>
    <information>
        <title>Our App.</title>
        <vendor>our.com</vendor>
    </information>
    <security>
        <all-permissions />
    </security>
    <resources>
        <j2se version='1.5+' />
        <jar href='our.jar' main='true' />
        <jar href='sqlite.jar' />
    </resources>
    <!-- Supply the DLL only to windows -->
    <resources os='Windows' >
        <nativelib href='sqlite-jni-windows.jar' />
    </resources>
    <application-desc main-class='com.our.Main' />
</jnlp>

In this example, all resources should be located in http://our.com/lib/.

The native (in this case a DLL) should always be in the root of the Jar file.


I also offer JaNeLA which checks the validaty of JNLP files & performs sanity checks on many other aspects of JWS based launches.

like image 64
Andrew Thompson Avatar answered Jan 30 '26 10:01

Andrew Thompson



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!