title: Self signing jar file, doesn't find JarSigner class
body: <p>I'm trying to sign my java applet.
  I ran the following lines to create a cert:</p>
  
  <pre><code>keytool -genkey -keystore myKeyStore -alias ben
  keytool -selfcert -keystore myKeyStore -alias ben
  </code></pre>
  
  <p>up to here everything works well. It requires a password and some details and creates the MyKeyStore file.</p>
  
  <p>Then I run this line:</p>
  
  <pre><code>jarsigner -keystore myKeyStore nnis.jar ben
  </code></pre>
  
  <p>But all it does is tell me:</p>
  
  <pre><code>Error: Could not find or load main class sun.security.tools.JarSigner
  </code></pre>
  
  <p>the file tools.jar (in which the JarSigner.class exists) is in the "PATH", and just to be sure, I also copied it to the local dir from which I run the jarsigner command.</p>
  
  <p>What am I doing wrong?</p>
  
  <p>I would appreciate any advice - to solve the problem or bypassing it.</p>