Step 1: Get a code signing certificate
Read this entry in our knowledge base how to get a code signing certificate. This will explain what type of certificate you need and also where you can purchase an affordable certificate.
Step 2: Sign all the jar Files
Using ANT
Both the applet jar file as well as our Qoppa’s jar file (jPDFPrint.jar, jPDFViewer.jar, jPDFNotes.jar or jPDFxxx.jar depending on what library you’re using) need to be signed with your certificate.
If you purchased a pkcs12 official certificate, the ant build command to sign a jar file will look like that:
<signjar jar="MyJarFolder/xxx.jar" alias="le-a2778978e096-28b0-6a77-9d04-aba0b6a71e0e" storetype="pkcs12" storepass="mypass1234" keystore="MyCertificateFolder/qoppasoftware.pfx" keypass="mypass1234" signedjar="MyJarFolder/xxxS.jar"/>
You will replace xxx.jar with the name of the jar file you are signing and xxxS.jar with the name of the output signed file desired.
Make sure you are using the JDK in Eclipse, the JRE is not enough as the jarsigner tool needed to run the command above is distributed with the JDK and is located under in $JAVA_HOME/bin or C:\Program Files\Java\jdk1.6.x_xx\bin\jarsigner.exe.
Using JarSigner in Command Line
You can also use jarsigner tool directly without using ant
jarsigner -keystore vkeystore -storepass mypass1234 -keypass mypass1234 -alias id1 -signedjar xxxS.jar xxx.jar