[Logo]
Forums Register Login
can we call jar.. ...
Hi!..

Once again I'm in argument with my college. The Question is..

Can we call jar file using java.lang.runtime using jsp ?
The jar file contains a class which creates a JFrame.


I say that if any native call which is not terminated automatically will issue and error.

She says there should be a way and what I reasoned is wrong.

Please settle our argument.

Thanks in advance
P-r-e-s-i
A jar utility can be called Using java.lang.runtime.exec provided it's added to the appropriate path . But i feel JSP is not the right place for this. JSP should be used for rendering a webpage.
Several points:

- The previous post is spot on, it is very bad design to have a JSP do a Runtime.exec.
- The server may be "headless" -i.e. have no windowing system-, or the web server may not be allowed to open windows. In both cases this call will fail.
- The newly created process is independent of the JSP. Whether it is still running when the JSP is done rendering has no bearing on it. It will continue to run afterwards.
- All of which begs the question: What is the point of running a GUI process on the server?
Thank you guys 4 your replies

Its really dumb to do that with JSP..

But Yeah I've learnt some..


Thanks once again..

P-R-E-S-I
Hi once again!

Previously I've posted a topic on calling a jar file..

Hope this link takes you there http://www.coderanch.com/t/327768/java/java/we-call-jar


The reason I choose to run a seperate program is, that part of process is a heavy-weight operation. So, Instead of keeping stress on the server which has other important jobs to handle, I've decided to run a seperate program using java.lang.runtime.exec ...

Is my design correct?

Are there any flaws...!! (there are bound to be .. Just let me know).

Is there any specific way of communication between the stand-alone-jar-utility and the server..???


Please help.. I'm in a dialema!!!

Thanks in Advance

P-R-E-S-I
Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards



All times above are in ranch (not your local) time.
The current ranch time is
Dec 14, 2017 01:29:28.