java.security.AccessControlException

Discussion in 'Java' started by nandu, Dec 17, 2006.

  1. nandu

    nandu Guest

    Friends

    Currently Iam working on a program to implement the Remote Desktop
    feature of Windows using Java.The pgm was tested using two systems as
    well as using the IP 127.0.0.1 on the same system.(Implies that it
    contains a Server pgm as well as Client pgm)
    To be precise it uses JAVA RMI . But when i try to run the same in my
    sytem it shows the following error.Iam also using Zone Alarm Security
    Suite for my XP SP1 machine which runs on an AMD64 1.8GHz.Iam using JDK
    1.5 .

    Output
    ----------
    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.

    RMIregistry is running.


    G:\java\RMI\MySPyWatcher\with screenshot\built1>java MySpyServerImpl
    Sorry dude!!!java.security.AccessControlException: access denied
    (java.net.Socke
    tPermission 127.0.0.1:1099 connect,resolve)

    Could you please help me with this?Has it got anything to do with the
    PORT issues of SP1 XP?I have heard something of that sort.Plz help
    Thank you in advance
     
    nandu, Dec 17, 2006
    #1
    1. Advertising

  2. nandu wrote:
    >
    > G:\java\RMI\MySPyWatcher\with screenshot\built1>java MySpyServerImpl
    > Sorry dude!!!java.security.AccessControlException: access denied
    > (java.net.Socke
    > tPermission 127.0.0.1:1099 connect,resolve)
    >
    > Could you please help me with this?Has it got anything to do with the
    > PORT issues of SP1 XP?I have heard something of that sort.Plz help



    AccessControlException (extends SecurityException) is an exception from
    security imposed by Java. It is not due to the operating system. Your
    code needs the permissions specified in the error message.

    Presumably you are setting an RMISecurityManager (which isn't actually
    any different to SecurityManager) in order to download code from the
    remote host (in this case it's just a loopback). Two easy options are to
    supply a java.policy file to grant those permissions, or override
    SecurityManager.checkConnect to skip the check.

    Tom Hawtin
     
    Thomas Hawtin, Dec 17, 2006
    #2
    1. Advertising

  3. Thomas Hawtin wrote:
    > nandu wrote:
    >
    >>
    >> G:\java\RMI\MySPyWatcher\with screenshot\built1>java MySpyServerImpl
    >> Sorry dude!!!java.security.AccessControlException: access denied
    >> (java.net.Socke
    >> tPermission 127.0.0.1:1099 connect,resolve)
    >>
    >> Could you please help me with this?Has it got anything to do with the
    >> PORT issues of SP1 XP?I have heard something of that sort.Plz help

    >
    > AccessControlException (extends SecurityException) is an exception from
    > security imposed by Java. It is not due to the operating system. Your
    > code needs the permissions specified in the error message.
    >
    > Presumably you are setting an RMISecurityManager (which isn't actually
    > any different to SecurityManager) in order to download code from the
    > remote host (in this case it's just a loopback). Two easy options are to
    > supply a java.policy file to grant those permissions, or override
    > SecurityManager.checkConnect to skip the check.
    >
    > Tom Hawtin


    Personally, I'd be sure to learn this stuff and understand exactly what
    the security model and threat model of the system is before granting new
    permissions in some sort of remotely-accessible system, but hey, that's
    just me. :)
     
    John Ersatznom, Dec 18, 2006
    #3
  4. nandu

    nandu Guest

    Thomas Hawtin wrote:

    > nandu wrote:
    > >
    > > G:\java\RMI\MySPyWatcher\with screenshot\built1>java MySpyServerImpl
    > > Sorry dude!!!java.security.AccessControlException: access denied
    > > (java.net.Socke
    > > tPermission 127.0.0.1:1099 connect,resolve)
    > >
    > > Could you please help me with this?Has it got anything to do with the
    > > PORT issues of SP1 XP?I have heard something of that sort.Plz help

    >
    >
    > AccessControlException (extends SecurityException) is an exception from
    > security imposed by Java. It is not due to the operating system. Your
    > code needs the permissions specified in the error message.
    >
    > Presumably you are setting an RMISecurityManager (which isn't actually
    > any different to SecurityManager) in order to download code from the
    > remote host (in this case it's just a loopback). Two easy options are to
    > supply a java.policy file to grant those permissions, or override
    > SecurityManager.checkConnect to skip the check.


    Tahnk you very much for that timely help Mr Tom.Would definitely get
    back to you after I resume my work on it after my Tests

    >
    > Tom Hawtin
     
    nandu, Dec 18, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Thanasis \(sch\)
    Replies:
    0
    Views:
    5,479
    Thanasis \(sch\)
    Mar 1, 2004
  2. BADBOY
    Replies:
    8
    Views:
    6,688
    Roedy Green
    Jul 12, 2004
  3. Replies:
    1
    Views:
    841
    Matt Humphrey
    Aug 14, 2006
  4. Z
    Replies:
    3
    Views:
    1,565
  5. merrittr
    Replies:
    10
    Views:
    1,295
    merrittr
    Mar 25, 2007
Loading...

Share This Page