Reputation: 31
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.
Upvotes: 3
Views: 681
Reputation: 168825
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.
Upvotes: 3
Reputation: 1922
In our case, we specify all the files needed (jar and zip wise) in our jnlp file. We have used .dll's but they were packaged with a program that was already installed on the system. We interacted with this program via ours. All we needed was to make sure the path to the .dll's was specified in the Windows path variable.
In terms of packaging, we packaged all our jars into a .war file and then put that .war into an .ear file (not necessary, but we did) and deployed that to our application server. When we updated the jar versions in our war, we also updated the jar version numbers in our .jnlp file (as well as in some version.xml file we use) and redeploy it all. Then when the client's fire up, they check against the new .jnlp file and download the right jars.
Is that helpful? Did I understand your question correctly?
Upvotes: 0