Java interprocess communication

Is it possible to use java class launch on the command line to run a specific class or function in swing start?

for example, when java Test asd sets Text to run swing Jlabel in asd

+4
source share
2 answers

The easiest way is to create an RMI method call.

It is built into java from the very beginning, quite simple and easy.

+3
source

Two programs work in separate processes. You will need to create an interface between the processes (or, according to Matthew: implement inter-process communication ). There are millions of ways to achieve this, just to name a few:

  • Create a file interface (the test file will be written to the file, and JLabel will read this file)
  • Create a TCP / IP connection between the two
  • Create an HTTP connection between the two (JLabel might be launching a stream from Glassfish or something like that)
  • Creating a JMS Connection
  • Create an RMI Method Call
  • Create a web service (again using JLabel working with the background)
  • Many more ...
+9
source

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


All Articles