• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JNLP mutiple JAR launching issue

 
Suhas Mohamedali
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a swing application which I can launch using JNLP.
Some screen refers to an external jar tablelayout.jar kept in a folder in ROOT Tomacat6.

The jnlp is as below.

<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+" codebase="http://localhost:8080/" href="Test.jnlp">
<information>
<title>HCS TESTING</title>
<vendor>SUHAS</vendor>
<homepage href="http://localhost:8080/" />
<description>Testing Testing</description>
</information>
<security>
<all-permissions/>
</security>
<resources>
<property name="jnlp.packEnabled" value="true"/>
<j2se version="1.6+ 1.5+ 1.4+ 1.3+"/>
<jar href="hcs.jar" main="true" download="eager"/>
<jar href="hcsLib/tableLayout.jar" />
</resources>

<application-desc main-class="com.test.admin.desktop.HCSMainFrm">
<argument>-f</argument>
<argument>Client.cfg</argument>
</application-desc>
</jnlp>

When I remove the

<jar href="hcsLib/tableLayout.jar" />

entry the application launches perfectly. But when I include it I am not able to launch the application and give the exception like

#### Java Web Start Error:
#### Found unsigned entry in resource: http://localhost:8080/hcsLib/tableLayout.jar

I need the jar as it supports the look and feel. Please help to resolve this.
 
Martin Vajsar
Sheriff
Posts: 3752
62
Chrome Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch, Suhas!

Generally, every component of an application being run via WebStart must be signed. The problem seems to be that the file tableLayout.jar is not signed. You seem to be signing other files in your application (otherwise it would not run), so you probably might sign this file using the same certificate too. There is probably an Ant task for signing files, or you could do so manually using the jarsigner tool from the JDK.
 
Maneesh Godbole
Saloon Keeper
Posts: 11165
14
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Martin Vajsar wrote:There is probably an Ant task for signing files, or you could do so manually using the jarsigner tool from the JDK.

Sure is
 
Suhas Mohamedali
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply martin and maneesh....

The jar is downloaded from a third party site (So do we need to sign it again with the same certificate?).
I tried to sign the jar using same certificate.
Still it is showing the previous error message.

I have another query (Sorry not part of JNLP) ..

Could you please help to suggest sign all the jar in folder simultaneously with same certificate?
 
Martin Vajsar
Sheriff
Posts: 3752
62
Chrome Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should not need to sign the third-party library if it was signed, but the error message seems to indicate it isn't properly signed. You can run jarsigner -verify -verbose file.jar to display information about the problematic file.

I'd prefer to sign all components of a single application using a single certificate, but frankly this is just my guess, I don't know what the standards/common practices are when including a third party signed jar in your project.

jarsigner does not seem to offer an option to sign multiple files, but this can be easily done from the command line using OS shell support: in Windows, there is the for command, for example. (It's been ages since I was on Unix and I don't remember the corresponding shell command, but generally Unix shells are much more powerful than the cmd in Windows.)
 
Suhas Mohamedali
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks martin.

I need to sign every jar in the folder and it worked.
But i needed to do it for all jars separately . But the application is running now.

 
Jacob Anawalt
Ranch Hand
Posts: 64
Linux Netbeans IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have had similar problems when including 3rd party jars in the jnlp resources. JWS wants all jars within a jnlp to be signed by the same certificate.

One way to use a signed 3rd party jar without removing their signature and re-signing is to make an additional component-desc JNLP file and point to it from your main JNLP as an extension.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic