简体   繁体   中英

Need to read java runtime jar file from delphi application

In Java Program, i have declared one global variable which starts from zero and used one timer to increase that global variable for every 5 seconds. And i started that application.My question is i need to access that particular procedure and also i need to access that variable through my Delphi application.I got some information about JNI file.Is it possible to use that to read the jar java application.

No, using JNI you can access native core, or you can from native code run Java. But here you need some IPC mechanism. I think that the best solution here is using sockets. Open listening socket in Java, acceps incoming connections and write current value of the global variable into socket's output stream. From Delphi connect this socket and read from socket's input.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM