I need to use a custom provider with Jarsigner. The provider is in its own jar file and it also requires a bunch of 3rd-parth jar files. The command I am using to run is this:
jarsigner -storetype MyProvder -storepass ignored -keypass ignored -keystore NONE -sigalg SHA256withRSA -signedjar signed.jar -J-cp -Jlib/accessors-smart-1.2.jar:lib/activation-1.1.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/tools.jar test.jar
and I get
Error: Could not find or load main class sun.security.tools.jarsigner.Main
How can I make it work? I do not want to copy the jar files to the $JAVA_HOME/jre/lib/ext directory. I am using OpenJDK 8 under Ubuntu.