1

I want to use jarsigner.exe on a machine where I don't have JDK installed or JAVA_HOME set.

We are using installanywhere to install our product and inside that we have bundled JRE. JRE doesn't have jarsigner.exe. I tried to included jarsigner.exe inside jre and tried to use it but it's not working.

With regards, Avinash Nigam

aviundefined
  • 802
  • 2
  • 10
  • 25
  • 1
    Wait, why would you need to do that? Can't you sign your jar before you package it in your installer? – Elliott Frisch Feb 06 '14 at 01:40
  • there are few jars which are open for customization which contains hook. I can't overwrite those jars so which jars are not open for customization I am signing it and bundling it in installer. Now the question is why would I want to sign the jar which are open for customization. Because I have few packages which are same in jars so they need to sign with same signature. – aviundefined Feb 06 '14 at 02:03
  • Why do your jars need to be signed? It sounds like they aren't Applets. Also, you plan to sign their (end-user) customized code? That sounds like a **very** bad plan. – Elliott Frisch Feb 06 '14 at 02:19
  • It's not applets that is correct. You can say that it's a bad plan but it's our requriement. In our app there is few jars which are part of product and there are few jar which are open for customization but customization is also done by our service department only. So we want to lock our content by signing and also put some validation by using time stamp of signature. – aviundefined Feb 06 '14 at 02:50
  • 1
    possible duplicate of [Launching jarsigner.exe on windows os which jdk/jre not installed by installer](http://stackoverflow.com/questions/10991856/launching-jarsigner-exe-on-windows-os-which-jdk-jre-not-installed-by-installer) – Elliott Frisch Feb 06 '14 at 02:56

1 Answers1

4

To make jarsigner work with JRE instead of JDK. Need to bundle these files in JRE from JDK

  1. From \bin\jarsigner.exe to \bin\jarsigner.exe
  2. From \bin\msvcr100.dll to \bin\msvcr100.dll
  3. From \bin\jli.dll to \bin\jli.dll
  4. From \lib\tool.jar to \lib\tool.jar

I tested with this and found it working for me.

aviundefined
  • 802
  • 2
  • 10
  • 25