[6532] in java-interest

home help back first fref pref prev next nref lref last post

Re: AppletSecurity Exception

daemon@ATHENA.MIT.EDU (LAUREN LEUNG)
Wed Apr 3 13:00:27 1996

Date:         Wed, 3 Apr 1996 09:40:30 PST
Reply-To: Java Interest <JAVA-INTEREST@JAVASOFT.COM>
From: LAUREN LEUNG <lauren_leung@SPECTRUMSIGNAL.BC.CA>
To: Multiple recipients of list JAVA-INTEREST
              <JAVA-INTEREST@JAVASOFT.COM>

     There are differences in ACCESS rights and Security Settings for Java
     Applications and Java Applets!!!  Applets have a LOT more
     restrictions!!  Maybe you can send me details on what you wanna do and
     I'll see how I can help you in solving your problem.  Issues related
     are like: socket connections, server access, URL access etc...
     So, the same piece of code CAN DEFINITELY runs fine in an Application
     mode and crashes in an Applet sense.  Furthermore, the same piece of
     code which is running fine with AppletViewer need NOT to run on
     Netscape!!

     - Lauren

     | Arctica Systems
     | Network Systems Engineer
     |          Email: l.leung@ieee.org
     |          Phone: (604)421-6115 ext.212


______________________________ Reply Separator _________________________________
Subject: AppletSecurity Exception
Author:  Java Interest <JAVA-INTEREST@javasoft.com> at INTERNET-MAIL
Date:    4/3/96 8:52 AM


I was trying to establish an URL connection.  When I run my code as a
standalone program, it works fine. However, when I run it as an applet,
I receive the following error message:

*** Security Exception: socket.connect:->www-leland.stanford.edu ***
sun.applet.AppletSecurityException: security.socket.connect: ->www-leland.stanfo
rd.edu
        at sun.applet.AppletSecurity.checkConnect(AppletSecurity.java:424)
        at sun.applet.AppletSecurity.checkConnect(AppletSecurity.java:363)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:103)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:412)
        at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection
.java:68)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
nection.java:159)
        at test.getInputData(test.java:41)
        at test.init(test.java:26)
        at sun.applet.AppletPanel.run(AppletPanel.java:243)
        at java.lang.Thread.run(Thread.java:289)
error in creating input stream.

What have I done wrong?

home help back first fref pref prev next nref lref last post