redDragonzz
redDragonzz

Reputation: 1571

Exposing application events from C++ to Java

I have a binary application written in c++ that achieves some copying and analysis of data. I can output how much analysis is left i.e. a progress of some sort.

Now I wish to have a web interface to allow me to run this service over the network and monitor its progress. I want to write the web application interface in Java. Is there a way to communicate between the two types of applications i.e. being able to monitor the progress of c++ application from a Java application.

Can Named Pipes achieve such a thing? Also, will the solution be cross-platform? or is this just plainly impossible.

Upvotes: 1

Views: 159

Answers (1)

Philipp
Philipp

Reputation: 69663

When you start the C++ binary from Java using a Process object (either by using a ProcessBuilder or the quick and dirty method Runtime.exec()), you can use process.getInputStream() to read the text output of the C++ binary.

Upvotes: 1

Related Questions