# Not working

douglas (douglas@tp.ac.sg)
Mon, 23 Mar 1998 11:40:32 +0800

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Soren Dittman: "JCE in europe"
- Previous message: up@uplinkpro.com: "OK to send e-mail?"

    Date: Mon, 23 Mar 1998 11:40:32 +0800

    From: douglas <douglas@tp.ac.sg>

    To: java-security@web4.javasoft.com

    Subject: Not working

Hello

This is my last resort! I've been trying to get a signed applet up and
running, but with no success. I tried 1.1.4, but then read about a bug.
So I downloaded 1.2, but still no success (I keep getting a security
exception). My OS is Win 95.

This is my java file:

import java.io.*;
import java.awt.*;
import java.applet.*;

public class Write extends Applet {
public void init(){
try {
FileWriter fw = new FileWriter("score.txt");
fw.write("New high score: 14\n");
fw.close();
} catch (IOException ioe) {System.out.println(ioe);}
}

public void paint(Graphics g) {
g.drawString("Have written the file", 10, 10);
}
}

This is what is do with keytool and jarsigner:

keytool -genkey // the alias mykey is used, and I enter a password when
prompted.

jar -cf write.jar Write.class

jarsigner write.jar mykey

It doesn't work!

I keep getting an AccessControlException.

This is driving me crazy. Any help ...? What am i doing wrong?

Thanks
Douglas

- Next message: Soren Dittman: "JCE in europe"
- Previous message: up@uplinkpro.com: "OK to send e-mail?"