0

I have a java console application, that prints out strings of information, using 3 or 4 methods to do so. e.g. listValues(), listValuesAsc()

Is it possible to create a NodeJS/Express server that can call my Java App and use the outputs from the methods as responses within the web-server

3
  • What is the java command you wish to print the output to your express app? Commented Jan 21, 2018 at 15:15
  • At the moment I just have a simple Java app that has a main() which would do something like person.listAge(). Is it possible to have a Node/Express web-server link and call person.listAge() instead of the java main method? Not sure if this is even possible Commented Jan 21, 2018 at 15:34
  • The only solution I know would be to use the spawn function of nodeJS to execute a command (you would execute a java command and then return the result with express). You should look at this question: stackoverflow.com/questions/34817897/… Commented Jan 21, 2018 at 15:57

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.