I have build a executable jar file which will accept one runtime argument from client and based on that will do SQL query and printing the response in output console. We just want to publish the same among our team instead of hand it over as jar we want to give a URL link. The user can enter the value from html which will be feed into JAVA runtime argument and that will print the result in console. The output console I want to print it back the same html page where user entered data.

I can done this by using spring-boot. But We can't make any changes in the code base just all We want to create a wrapper on top of jar file. It would be HTML URL end point.

I knew the question is broad. But I hope that I delivered what I intended to do. I'm not sure how can I kick start this that's why I'm here for yours help.

Please share yours suggestion and technology that would help us to achieve this.

I don't have any control to change the jar file all I just want to do end point that gonna access that jar file.

I'm open for any java based framework.

1 Answers

0
Michiel On

Assuming you've tried every other option and wrapping the JAR is the only option remaining: You could implement a ProcessBuilder to execute a command and read the output.

[edit]

Some examples on mkyong: https://www.mkyong.com/java/java-processbuilder-examples/