0

I am looking at upgrading a Java server applications UI. The stack the team has decided is Electron with a .NET Core rest api and it is going well, however we do not have enough time to migrate all the code over to .Net Core and must keep most of the code on the java side. Originally it used RMI calls to talk between the Swing Java interface and Java service. We need to interface with RMI calls though .Net and its not going well.

After some research we came across IIOP.NET however this is not a .Net Core library and does not seem to be support anymore At this point my research has come to a stand still I even went to the second page of Google. Does anyone have any ideas how we could approach this problem?

1 Answers1

1

need to interface with RMI calls though .Net

Yeah I don't think that's going to work. RMI wasn't designed to be used with anything other than Java. It's tightly coupled with the serialized object format, and generally a pain in the neck to deal with.

It will be easier to add a REST API to the Java service, which you can then call from .Net or from the Electron app.

Joni
  • 108,737
  • 14
  • 143
  • 193
  • The struggle is everything has to be local and cant open a port for security reasons. We looked into spring Java but it seems it opens port 8080. Is there a way for us to not open that port? From our research it will need to access that port for the API to work. – Mitch McCollum Jul 08 '20 at 12:56
  • When you say everything has to be local, do you mean the client and the server both run on the same host? You don't need to "open" ports, you can implement the service so that it only uses the loopback interface, and only accepts connections from the host where it's on. RMI also needs ports to function. – Joni Jul 08 '20 at 13:04
  • Im not sure I follow fully, they do run on the same machine would that be done though tomcat or spring? – Mitch McCollum Jul 08 '20 at 19:25
  • The concrete way to configure the bind address of course depends on which server you end up using. If you use the "spring boot" server, you would set `server.address=127.0.0.1`. If you use Tomcat, you would use the "address" configuration element https://tomcat.apache.org/tomcat-9.0-doc/config/http.html#Standard_Implementation – Joni Jul 08 '20 at 19:53
  • 1
    Thank you this works for me! We moved to spring boot and are going to do it like you described. – Mitch McCollum Jul 09 '20 at 15:00