#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2001
    Location
    South Yorkshire
    Posts
    442
    Rep Power
    24

    applet securiy issue


    I'm currently learning the coding side of java applets. I have created a .class file and am trying to open a socket to the same macine.

    I get the following error:

    exception: com.ms.security.SecurityExceptionEx[test.init]; cannot connect to "192.168.x.x"

    I've read about and it's obviously something to do with securty issues, on either:

    trying to opened a socket ona port lower than 1024, or
    open a socket to a differnet machine.

    The port is indeed lower (1000) but I changed it in the .class and the server and still get the error.

    I also read that I have to sign the applet? but it looked like too much work.

    Is there a solution to this. I dont care about security at this present moment in time. The applet can only be rang internally anyway, so there is no threat from the outside.

    Cheers for reading.
    regards,

    pgudge
  2. #2
  3. Mobbing Gangster
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Sep 2001
    Location
    "Best City" 2002 and 2003- Melbourne, Australia
    Posts
    4,912
    Rep Power
    33
    Indeed this is a limitation of java applets - they only can open network connection to the originating host (that is where you downloaded code from) and they cannot open connection to user's computer. In your situation, you're both host and user, and I that is causing this problem. To fix that, use applet viewer instead of browser to use your applets.

    P.S. you do not have to xx your ip since 192.168.*.* is lan range and everyone has their own - we will not be able to access your computer from the interent.
    And you know I mean that.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2001
    Location
    South Yorkshire
    Posts
    442
    Rep Power
    24
    Originally posted by AlCapone
    P.S. you do not have to xx your ip since 192.168.*.* is lan range and everyone has their own - we will not be able to access your computer from the interent.
    made me laugh. Can't rememeber my IP since I been messing with DHCP so I simply put x.x

    Okay i'll get the applet viewer, and test from there.

    So If I ran the service on the webserver and then java applet off the webserver via my client machine, it should then be able to connect?
    regards,

    pgudge
  6. #4
  7. Mobbing Gangster
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Sep 2001
    Location
    "Best City" 2002 and 2003- Melbourne, Australia
    Posts
    4,912
    Rep Power
    33
    Originally posted by pgudge


    made me laugh. Can't rememeber my IP since I been messing with DHCP so I simply put x.x

    Okay i'll get the applet viewer, and test from there.

    So If I ran the service on the webserver and then java applet off the webserver via my client machine, it should then be able to connect?
    ip - know the situation
    And about running applet online - yes that is right, you will be able to connect to the server's port (that is where you got applet code from). As a matter of fact I'm pretty sure you will be able to do the same running applet from the browser.
    And you know I mean that.

IMN logo majestic logo threadwatch logo seochat tools logo