import chat.server not found
When I develop an RMI se开发者_高级运维rver, I use:
import java.rmi.server.UnicastRemoteServer;
import java.rmi.server.StubSecurityManager;
import chat.server.*;
But when I compile the Java file, an error occurs that says:
Class java.rmi.server.UnicastRemoteServer not found in import. import java.rmi.server.UnicastRemoteServer
and also error with StubSecurityManager
. Please help me work out this problem.
It appears that you are using an old code written in JDK1.1 trying to compile using newer version of JDK.
You need to make following changes.
java.rmi.server.UnicastRemoteServer -> java.rmi.server.UnicastRemoteObject
java.rmi.server.StubSecurityManager -> java.rmi.RMISecurityManager
Source: http://groups.google.com/group/comp.lang.java.api/browse_thread/thread/c768d6617f80eedd/4edf4acebd2ce575
精彩评论