Are you absolutely certain that you want to invoke a
whole new Java VM just to run this process ? Why can
you not simply import the class and call it's methods
directly ? You will have huge overhead calling the VM
like that......
//Nicholas
--- Jerzy Brzezicki <[EMAIL PROTECTED]> wrote:
> Hi,
>
> When I try to run separate process from inside
> doPost() it works fine
> untill it is java process.
>
> For example:
>
> Runtime rt = Runtime.getRuntime();
> Process pr = rt.exec("ls");
> InputStream in = pr.getInputStream();
>
> int c;
> while ((c = in.read()) != -1)
> {
> out.print((char) c);
> }
>
> it prints content of directory where the servlet
> class is located.
>
> However when I change the line
> Process pr = rt.exec("ls");
> to
> Process pr =
> rt.exec("D:\\jdk1.1.7\\bin\\java
> somepacket.Some_Tool");
> nothing happens.
> If I put the modified code just in java code (not
> servlet) and try to run it
> from there
> it works fine, that is I can start another java
> process from inside already
> running java process.
> But it does not work with servlets.
> Is it some security problem ? How to work it around
> ?
>
> Thanks,
> Jerzy
>
> ps. I know I could just call Some_Tool without
> runnig it as a separate
> process, but I need
> to do it that way.
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED]
> and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives:
>
http://archives.java.sun.com/archives/servlet-interest.html
> Resources:
>
http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help:
> http://www.lsoft.com/manuals/user/user.html
>
=====
"Piper, Piper the red red worm
awoke last night to the sound of the storm
the words are the words I sailed upon."
Piper, Phish
--
Nicholas Whitehead
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html