Hello,
I am trying to sign a jar file in JDK 6 update 32 and i am getting below error:
Exception in thread "main" java.lang.NoClassDefFoundError: sun/security/tools/Ja
rSigner
Caused by: java.lang.ClassNotFoundException: sun.security.tools.JarSigner
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: sun.security.tools.JarSigner. Program will exit.
I could not figure out which jar file to include in the classpath. Can someone suggest the correct way of doing it?
Yes, i am doing as you said. But why i am getting class not found exception? Which jar in should include in my classpath? I tried to look for sun/security/tools/JarSigner class under every jar i can think of within JDK but don't find it anywhere.
Bookmarks