1

I'm trying to run a Java WebStart application using Netbeans IDE. I've signed the application using a valid Comodo certificate. When I run the jar, it brings up a popup with the jar & its certificate's details. However, it then shows another popup with an error. I saw a post here with the same issue at Java Web Start manifest issue which provides the following solution:

I solved it.

In jnlpcomponent1.jnlp i see that sqljdbc4.jar is already signed by microsoft.

When i was looking to its manifest.mf it hasn't the attribute Permissions: all-permissions. So i delete all manifest file from sqljdbc4.jar and put an empty one (delete MSFTSIG.SF and MSFTSIG.RSA also). Build application again now with my signature and with Permissions: all-permissions in manifest file and works like a charm.

In my application, the 'jnlpcomponent1.jnlp' file contains four 3rd party jars that are already signed. My question is how do I unpack these jar's (to replace the Manifest with a blank one & delete the .SF and .DSA files) & re-pack it ?

Is there a way to manually do it (e.g., at command prompt) ? Can I manually unpack these 4 jars, edit their Manifest, remove the .SF & .DSA files and re-pack them ? Please let me know. Thanks.

Update: I have managed to resolve the issue today. Thanks.

Community
  • 1
  • 1
Ajit Singh
  • 115
  • 11

1 Answers1

0

I know this isn't exactly how you would do it in netbeans, however if you were using a build system (such as gradle) to manage everything for the webstart, then you could add the line to your jar task in your build.gradle that looks like:

jar{
    from {configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }

    manifest{
        attributes("Main-Class": mainClassName);
    }
}

that takes every dependency (the third party jars) unpacks (unzips) them and then packs (zips) them back up into a single jar next to your own, along with all of their manifest/etc files. There is a gradle plugin for netbeans (we use at work with great success), but it would obviously take some work to convert your project over, just something to keep in mind. I hope that helps in any small way.

WillBD
  • 1,919
  • 1
  • 18
  • 26
  • Hi, Thanks for your reply. But, is there a way to manually do this (e.g., at command prompt) ? Can I manually unpack these 4 jars, edit their Manifest, remove the .SF & .DSA files and re-pack them ? Please let me know. Thanks. – Ajit Singh Jul 21 '14 at 15:17
  • can you? sure, a jar is just a glorified zip file, really. Just make sure that you preserve all of the file structures very carefully. – WillBD Jul 21 '14 at 16:44