Thursday, November 15, 2007

How to open/read/write a local file from an applet - jar signing

OK, here we go:

'keytool' is delivered with Sun's development kit.

>> keytool -genkey -keyalg rsa -alias yourkey
Follow the instructions and type in all needed information.

Now we make the certificate:
>> keytool -export -alias yourkey -file yourcert.crt

Now we have to sign the applet:

Just make a *.bat file including this:

javac yourapplet.java
jar cvf yourapplet.jar yourapplet.class
jarsigner yourapplet.jar yourkey

The batch-file compiles the applet, makes a jar-archive and signs the jar-file.

The HTML-code to display the applet:
  ;


Now we are done! The applet is signed and if the user accepts the certificate, the applet is allowed to access local files. If the user doesn't agree, this appears in the console:

Centos 7 reset root/ any user lost password / lockout due to cant remember password

1. Need to be in front of the terminal. (Physically if not vm). 2. Reboot the server 3. Press 'e' in the GRUB2 boot screen. 3. bunch...