Am Freitag, 25. März 2005 18:51 schrieb Steve Butcher:
>
> Then I build that into a class:
>
>   public class Launcher {
>        public static main( String[] args) throws Exception {
>             new Launcher().play();
>        }
>
>        public void play() throws Exception {
>             String command = "\"C:\\Program
> Files\\VideoLAN\\VLC\\vlc.exe\" --extraintf=rc --rc-host=127.0.0.1:9066
> --rc-quiet \"rtsp://192.168.0.66/\"; :sout=#duplicate{dst=display}";
>             Runtime.getRuntime().exec( command);
>        }
>   }
>
> and invoked it from the command line:
>  >java Launcher
>
> and *that* works fine (VLC launches and the stream plays) which leads
> me to believe that there is nothing wrong with using Runtime#exec() in
> this particular instance AND the command is fine.
>
> HOWEVER, if I call the very same code in main() above from a JSP:
>
> <%
>       new Launcher().play();
> %>
>
> VLC launches but hangs with an "End Program" dialog.
>
> IF I replace the command string with:
>
> command = "notepad.exe";
>
> Notepad launches just fine, directly from the code AND from a JSP which
> leads me to believe it is not a permission problem under Tomcat.
>
Does vlc produce any output on stdout/stderr? If it does, it may stop when the 
output-buffer fills up. So you have to read Process#getOutputStream() to make 
it continue.

Regards
mks

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to