How to build this RMI project using Netbeans?

I follow this RMI walkthrough: http://www.javacamp.org/moreclasses/rmi/rmi.html

and already managed to compile and run this project using the command line, as described in this tutorial: http://www.javacamp.org/moreclasses/rmi/rmi6.html

But now I wonder how is it if I want to create this project using Netbeans? so that I can create a graphical interface for this project and just run it from the NetBeans IDE. So far I have tried several ways to create it on Netbeans, but each time the project did not start. please help, since I spent about 4 days and have not yet found a solution or guide that can help me.

this is a screenshot that I got after trying to run it from Netbeans:

error

thanks in advanced!

p / s: to be clear, what I'm trying to do is "create a swing client for an RMI application that creates and starts an RMI call in Netbeans instead of the command line"

+4
source share
3 answers

I finally found a way to do this. I need to start RMIRegistry first before starting the server. Unlike the command line, where I need to go in "run rmiregistry", I just need to put this line in my Server.java code in Netbeans to run rMIregistry: "LocateRegistry.createRegistry (1099)"; where 1099 is the port number.

enter image description here

+9
source

in fact, you can either use LocateRegistry.createRegistry (), or just type rmiregistry at the command line to start rmiregistry whenever you want to use it for a netbeans project

+3
source

“Connection refused” means that in this case there were no registries running on the specified IP port. So fix it or fix IP: port.

0
source

Source: https://habr.com/ru/post/1485990/


All Articles