I'm searching for a communication between a Java application 'A' and another Java application 'B'. I`ve heard from JNI, Webservices and other stuff...
Current State: I've two separate Java Applications; At the moment i can start both manually and each of them is working very well. For each of the applications i`ve wrote a test-class to chek each function and all sideeffects...; Application B implements an interface, so i know each function @ B that i want to run! Each application uses the same interfaces for exchanging data (in future).
Problem: Now i want to start Application A (it starts ~5 Threads by it self). A should search, in a defined Path, all JAR Files and start one of them (selection via UI @ A). OK, this is not the big problem for me! My problem: I want to interact with the loaded "JAR File" (or better: with the application in the JAR File).
Question: How is an interaction possible by unsing simple tools or frameworks; A Webservice seems to be not dynamic enought (I`m not that expert in Webservices, jet!)!?
Important for me are following points:
- Fast Communication
- Dynamic Loading of an external library (eq. the other Java application = B.) is required
- Package names shouldn`t be importat (i want to be open for other developers)
- Open for other Developers (they just have to implement my interface)
More specific
- A is a Controller / server /etc; runs more or less @ background
- B (ore all other implementations of my interface) is a Game; startet from A, controlled from A and stopped from A