beginner problem...

"daniel.manzke" <[email protected]> Thu, 16 Feb 2006 23:06:41 +0100
Newsgroups gmane.comp.java.sun.rmi
Message-ID <[email protected]>
Hi there...

I would be very happy if somebody could give hints and tipps where to find
informations about rmi using over the internet... because I have a pc at
home... where is an webserver running and the little applet from the sun
side for testing... because I can handle rmi over the internet...

I'm sitting behind a router... and from the outside you can reach the
website but the applet told me what there is an socketexception... I have
the policy file... and I generated the stubs...

The applet calls the lookup
obj = (Hello)Naming.lookup("//84.132.95.172/HelloServer");
which cause the failure...

and the server
         if (System.getSecurityManager() == null) {
                    System.setSecurityManager(new RMISecurityManager());
           }
         try {      HelloImpl obj = new HelloImpl();
                    Naming.rebind("//localhost/HelloServer", obj);
                    System.out.println("HelloServer bound in registry");
         } catch (Exception e) {
            System.out.println("HelloImpl err: " + e.getMessage());
            e.printStackTrace();
         }

And I started the rmi registry and the server with...
java  -Djava.rmi.server.codebase=http://sentisurf.dyndns.org/
-Djava.security.policy=D:\wampp2\htdocs\policy  HelloImpl

When I set the lookup at localhost and try it over the lan ... everything
works fine... but over the internet... nothing... the webside of the applet
appear ... java starts... then failure...


Any one any ideas? ...

I think that s a known beginner problem or :D... sorry but need some hints

===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff RMI-USERS".  For general help, send email to
[email protected] and include in the body of the message "help".

For a list of frequently asked RMI questions please refer to:
http://java.sun.com/j2se/1.3/docs/guide/rmi/faq.html

To view past RMI-USERS postings, please see:
http://archives.java.sun.com/archives/rmi-users.html