Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

error importing java.rmi.Registry and Server

 
C.B. Bakshi
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am getting an error "can't import java.rmi.Registry and java.rmi.Server" package when i compile the program
also the error is coming on the UnicastRemoteObject class
please reply
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java.rmi.Server and java.rmi.Registry are not class files. If you are trying to import both packages, try:
import java.rmi.server.*;
import java.rmi.Registry.*;
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic