Question : Java Applet Client - Security Exception

OK so I tried it and got this (unfortunately another) error:
appletviewer -J-Dappletviewer.security.m
ode=unrestricted app.html

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
C:\Users\Dan\Documents\DanJavaGen\multi>appletviewer -J-Dappletviewer.security.m
ode=unrestricted app.html
java.lang.SecurityException: class "ClientApplet$1"'s signer information does no
t match signer information of other classes in the same package
        at java.lang.ClassLoader.checkCerts(ClassLoader.java:769)
        at java.lang.ClassLoader.preDefineClass(ClassLoader.java:484)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:610)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
4)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
        at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:172)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:303)
        at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:144)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
        at ClientApplet.init(ClientApplet.java:20)
        at sun.applet.AppletPanel.run(AppletPanel.java:424)
        at java.lang.Thread.run(Thread.java:619)


That darn $1!!

Answer : Java Applet Client - Security Exception

> os = new PrintStream(clientSocket.getOutputStream());

should be:


os = new PrintStream(s.getOutputStream());
Random Solutions  
 
programming4us programming4us