Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to build this RMI project using Netbeans?

I have been following this step by step tutorial about RMI: http://www.javacamp.org/moreclasses/rmi/rmi.html, and already succeeded in compiling and running this project by using command prompt as what the tutorial has taught here: http://www.javacamp.org/moreclasses/rmi/rmi6.html.

But now I am wondering, how is it if I want to create this project using Netbeans? So that I can create GUI for this project and just run it from the Netbeans IDE. Up until now, I have tried the multiple numbers of way to create it on Netbeans, but each time, the project failed to be run. Please help, as I have spent about 4 days already and not yet find any solution or tutorial that can guide me through.

This is the screenshot that I got after trying to run it from Netbeans:

error

To be clear, what I am trying to do is "to create a swing client for the RMI application that create and run the RMI invocation in Netbeans instead of command line"

like image 683
Ryzal Yusoff Avatar asked Dec 15 '22 09:12

Ryzal Yusoff


1 Answers

I have finally found the way to do this. What i need to do is start the RMIRegistry first before i run the Server. Unlike in the command prompt where i have to typr "start rmiregistry", i just have to put this line in my Server.java code in the Netbeans to start thr RMIregistry : " LocateRegistry.createRegistry(1099);" where 1099 being the port number.

enter image description here

like image 103
Ryzal Yusoff Avatar answered Dec 17 '22 23:12

Ryzal Yusoff