Sinking in the JAVA quicksandbox
From: S J Rulison (srulison_at_aol.com)
Date: 10/28/04
- Next message: Tim Ward: "Re: [OT] Homework - Was Re: java programe help"
- Previous message: Lasse Reichstein Nielsen: "Re: Building an Opensource project...newb question."
- Next in thread: Andrew Thompson: "Re: Sinking in the JAVA quicksandbox"
- Reply: Andrew Thompson: "Re: Sinking in the JAVA quicksandbox"
- Reply: Filip Larsen: "Re: Sinking in the JAVA quicksandbox"
- Reply: Filip Larsen: "Re: Sinking in the JAVA quicksandbox"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 28 Oct 2004 08:51:28 -0700
A few days ago I posted a message regarding a problem I'm having with
establishing a socket connection between an applet and a server to
this group. I have recapped the crux of the situation below. After
conferring with some helpful individuals on this group and doing some
additional research on my own, I now believe that this has something
to do with the java SecurityManager. While I have been doing a lot of
research in this area I have yet to find what program, server /
applet, needs to be modified and which methods need to be overridden
in the SecurityManager. Some code samples in this area would really
be helpful. Any help would be greatly appreciated.
Thank you.
Sincerely,
Steve Rulison
PREVIUOUS POSTING:
I have a JAVA Applet and Server application written in version
1.4.2_05 running on a Windows XP platform. I use the socket (String
host, int port) class on the applet side to establish a connection
with the Server and the ServerSocket (int port) class on the server
side. When I run both the Server and Applet on the same workstation,
everything works fine but if I move the Server portion onto another
machine, I am unable to establish a connection with that Server (see
exceptions listed below). I've tried using the IP address of the
server, the name of the server, and the fully qualified name (server
name. domain name). All of these conventions work fine when both the
applet and the server are run from the same machine but as soon as I
separate the two programs to two different computers, it stops
working.
I even went so far as to purposely feed the server a factitious IP
Address and machine ID when I was running both processes from the same
machine to see if it would run anyway. It did not, which tells me
that the server application is doing something with that parameter
when it establishes a connection.
EXCEPTIONS:
java.security.AccessControlException: access denied
(java.net.SocketPermission 10.44.1.250 resolve)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkConnect(Unknown Source)
at java.net.InetAddress.getAllByName0(Unknown Source)
at java.net.InetAddress.getAllByName0(Unknown Source)
at java.net.InetAddress.getAllByName(Unknown Source)
at java.net.InetAddress.getByName(Unknown Source)
at java.net.InetSocketAddress.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at PTABLookup.createSocket(PTABLookup.java:110)
at PTABLookup.init(PTABLookup.java:87)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
- Next message: Tim Ward: "Re: [OT] Homework - Was Re: java programe help"
- Previous message: Lasse Reichstein Nielsen: "Re: Building an Opensource project...newb question."
- Next in thread: Andrew Thompson: "Re: Sinking in the JAVA quicksandbox"
- Reply: Andrew Thompson: "Re: Sinking in the JAVA quicksandbox"
- Reply: Filip Larsen: "Re: Sinking in the JAVA quicksandbox"
- Reply: Filip Larsen: "Re: Sinking in the JAVA quicksandbox"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|