How are you running Tomcat? As a service?  Try running it via
startup.bat so it uses your credentials and then trying.

Also try checking "Allow service to interact with desktop" if you are
running the service as Localsystem (although I wouldn't recommend
doing that for Production use, I'd create an account with the
permissions you need and use that instead)

Regards,
Jason


On Fri, 25 Mar 2005 12:51:22 -0500, Steve-O Steve Butcher
<[EMAIL PROTECTED]> wrote:
> I've been looking through the archives and reading the posts regarding
> Tomcat and Runtime#exec(). Almost everything I've read about
> Runtime#exec() points to the javaworld article on the pitfalls of
> Runtime#exec(). However, most of the examples seem to be for commands
> or shell scripts where some kind of interaction with the command line
> is desired.
> 
> The problem I'm having is with launching a windowed program, VLC,
> (http://www.videolan.org/)
> 
> I'm running Tomcat 5.0 (NOT as a service), JDK 1.4.2_07, W2KPro, VLC
> 0.8.1
> 
> On the command line, the following works fine (VLC launches and the
> stream plays).
> 
>   >"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}
> 
> basically, the command line options tell VLC to open a simple interface
> for remote control, open an input stream over rtsp and send the output
> to the display. More complicated outputs (files, transcodings, streams)
> can be constructed.
> 
> 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.
> 
> I've even gone so far as to create a BAT file with the same command and
> launch it using:
> 
> command = "cmd.exe /C C:\\path\\to\\file\\vlc";
> 
> and that works on the command line, directly in the code but NOT via
> JSP.
> 
> I'm nearing my wits ends so if someone out there ever figured out a
> similar problem or has a suggestion, I'd appreciate it.
> 
> Thanks in advance,
> Steve
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
Jason Bainbridge
http://kde.org - [EMAIL PROTECTED]
Personal Site - http://jasonbainbridge.com

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

Reply via email to