两个 java 程序如何进行交互?
怪我咯
怪我咯 2017-04-17 16:26:00
0
5
582
怪我咯
怪我咯

走同样的路,发现不同的人生

reply all(5)
巴扎黑

It is recommended to ask your project manager’s true intention clearly instead of getting entangled in the communication between two Java processes.

If what he means is that he hopes you can precipitate an Agent, deploy it locally, and receive instructions from the console. Because in addition to changing the log level, there may be other things that need to be done. For example, "grayscale switch", etc., then this matter is not just as simple as the communication between two processes, but also the communication protocol needs to be sorted out, the Client/Server architecture needs to be built, etc.

小葫芦

pipe, message queue, etc. Processes can communicate however they want...but shared memory Java shouldn't be able to do it

小葫芦

RMI and RPC, if these two framework projects are used, it will be fine. If not, it will be troublesome to use them for the first time.
There is a relatively simple way. You write a jar package and execute it using the jar command and then modify the log level, allowing the caller to use the Runtime to execute the jar command to call your jar package.

大家讲道理

Inter-process communication.

刘奇
#!/bin/ksh
echo "--------helloWorld------->>"
JAVA_HOME="/usr/jdk/jdk1.6.0_34"
JAVA_OPTIONS=" -hotspot -Xms128m -Xmx512m "
CLASS_PATH=.;./lib;
java -jar helloWorld.jar


这样?
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!