Java进程间通信 [英] Java Interprocess Communication

查看:111
本文介绍了Java进程间通信的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一种情况需要向正在运行的java应用程序发送命令,现在我使用tcp / ip socket使用Internet Explorer上下文菜单项向应用程序发送命令。但是一旦应用程序启动,病毒扫描程序就会抱怨应用程序开始监听,尽管我只是在监听本地连接。我认为这可能会让用户感到困惑。我正在寻找其他方式进行沟通而不会诋毁av扫描仪?

I have a situation where i need to send commands to a running java application, now i am using tcp/ip socket to send commands to the application using a internet explorer context menu item. But as soon as the application starts virus scanners complain that the application started listening, although i am only listening for local connections. I think this may be confusing to the users. I am looking at others ways of communicating without pissing off av scanners?

推荐答案

为此,你最好是基于文件的FIFO队列。或使用Java Native Access / Java Native Interface写入NamedPipe或共享内存。如果你去JNA / JNI路线,你可以创建一个指定活动

For this, you're best off a file based FIFO queue. Or using Java Native Access/Java Native Interface to write to a NamedPipe or Shared Memory. If you go the JNA/JNI route, you could create a Named Event.

但是如果不采用JNA / JNI路线,可能无法做任何你想做的事情。

But there's probably no way to do what you want, with any amount of efficiency without going the JNA/JNI route.

这篇关于Java进程间通信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆