Lesson 8: RMI, Error in Run the RemoteServer Server Object

Hello guys,

Please Help!

I try to test and run the samples in

JavaTM Programming Language Basics, Part 1

Lesson 8: Remote Method Invocation

http://developer.java.sun.com/developer/onlineTraining/Programming/BasicJava1/rmi.html

I already compiled the samples, but when I testing to run the RemoteServer Object it gives me error.

Here's the following line command:

java -Djava.rmi.server.codebase=file:

g:\home\zelda\public_html\classes

-djava.rmi.server.hostname=kq6py.eng.sun.com

-Djava.security.policy=java.policy RemoteServer

The ERROR:

Exception in thread "main" java.security.AccessControlException: access denied (

java.net.SocketPermission kq6py.eng.sun.com 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.getByName(Unknown Source)

at java.net.Socket.<init>(Unknown Source)

at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown S

ource)

at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown S

ource)

at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)

at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)

at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)

at sun.rmi.server.UnicastRef.newCall(Unknown Source)

at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)

at java.rmi.Naming.rebind(Unknown Source)

at RemoteServer.main(remoteserver.java:38)

PLEASE HELP!!!

Thanks in advance,

Rodel

[1980 byte] By [rodelb] at [2007-9-26 1:24:42]
# 1
Oooppssss, I got it.uh huh!!!!
rodelb at 2007-6-29 1:05:10 > top of Java-index,Core,Core APIs...