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

RMIServer is abstract and cannot be instantiated

 
Stephen Black
Ranch Hand
Posts: 52
1
Chrome MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am creating a simple RMI server but I get the error message RMIServer is abstract and cannot be instantiated
but what is funny is that another almost identical RMI example which I was copying off doesn't have any problem
First I will show you the example that compiles and runs

Despite being almost the same as the previous example I get the following error
RMIServer is abstract; Cannot be instantiated
 
Stephen Black
Ranch Hand
Posts: 52
1
Chrome MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was expecting that RMIServer() was a class that was contained in an imported libraries
But when I reviewed the code I noticed that the class was RMIServer() so really the server is
the object I created and it becomes a server when I bind it to the RMI Registry using the Naming.rebind method
 
Stephen Black
Ranch Hand
Posts: 52
1
Chrome MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yep I solved it!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic