[1877] in java-interest

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

Re: Handling sockets in the JDK...

daemon@ATHENA.MIT.EDU (Arthur van Hoff)
Tue Sep 19 05:53:32 1995

Date: Fri, 15 Sep 1995 10:10:06 -0800 (PDT)
From: Arthur van Hoff <Arthur.Vanhoff@Eng.Sun.COM>
Reply-To: Arthur van Hoff <Arthur.Vanhoff@Eng.Sun.COM>
To: Chuck Williams <chuck.williams@template.com>
Cc: java-interest@java.Eng.Sun.COM



Hi Chuck,

> I finally got my old Alpha3 app converted to the new JDK prebeta.  In doing
> that I have learned how to throw and catch exceptions (neat terms!! beats
> "raising" and "handling" from Ada :) ).  Now I've run into a security
> problem when I run my applet in the appletviewer...

Unfortunately we have hardwired the security mode for the appletviewer to
be "source only". I can't tell you how to turn it off. Sorry.

> 
> *** Security Exception: socket.connect:->lion ***
> sun.applet.AppletSecurityException security.socket.connect: ->lion
>         at java.lang.Throwable.<init>(Throwable.java)
>         at java.lang.Exception.<init>(Exception.java)
>         at java.lang.RuntimeException.<init>(RuntimeException.java)
>         at java.lang.SecurityException.<init>(SecurityException.java)
>         at
> sun.applet.AppletSecurityException.<init>(AppletSecurityException.java:36)
>         at sun.applet.AppletSecurity.checkConnect(AppletSecurity.java:299)
>         at sun.applet.AppletSecurity.checkConnect(AppletSecurity.java:271)
>         at java.net.Socket.<init>(Socket.java)
>         at java.net.Socket.<init>(Socket.java)
>         at sun.net.NetworkClient.openServer(NetworkClient.java:47)
>         at sun.net.NetworkClient.<init>(NetworkClient.java:71)
>         at IpcTest.init(IpcTest.java:53)
>         at sun.applet.AppletPanel.run(AppletPanel.java:259)
>         at java.lang.Thread.run(Thread.java)
> 
> This is line 53 in IpcTest.init:
>             client = new sun.net.NetworkClient("lion", 1719);
> 
> I really don't care about security at this point as I am running inside a
> well protected network (it has no live connection to the outside world).  So
> how do I solve this problem??

We will add a feature to turn of security in the next release. In the mean
time you will be allowed to connect only to the same server as where the applet
was loaded from.

Have fun,

	Arthur van Hoff
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com

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