This behaviour makes sense to me as you are trying to display an application 
but there is not necessarily a windows display associated with Tomcat so it 
doesnt know where to launch the app to.

And by the lack of error message i'd guess that the application is actually 
getting launched but not displayed on the console. 

-----Original Message-----
From: andy wix [mailto:[EMAIL PROTECTED]
Sent: 29 November 2004 09:45
To: [EMAIL PROTECTED]
Subject: Runtime.exec security issue?


Hi,

I am trying to run a simple exec command to open notepad with code as 
follows:

Runtime runtime = Runtime.getRuntime();
Process proc = runtime.exec("C:\\WINDOWS\\system32\\notepad.exe");

This code works fine from a stand-alone program but not run under Tomcat.

I CAN successfully set the the system time and date using the same approach 
though.

I get the same results when Tomcat is not run as a service.

I am running Xp with Tomcat 5.0.27.

I thought this might be a java permissions issue, but I don't get any 
exceptions thrown - just nothing happens.

Thanks,
Andy

_________________________________________________________________
Use MSN Messenger to send music and pics to your friends 
http://www.msn.co.uk/messenger


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

Any opinions expressed in this E-mail may be those of the individual and not 
necessarily the company. This E-mail and any files transmitted with it are 
confidential and solely for the use of the intended recipient. If you are not 
the intended recipient or the person responsible for delivering to the intended 
recipient, be advised that you have received this E-mail in error and that any 
use or copying is strictly prohibited. If you have received this E-mail in 
error please notify the beCogent postmaster at [EMAIL PROTECTED]
Unless expressly stated, opinions in this email are those of the individual 
sender and not beCogent Ltd. You must take full responsibility for virus 
checking this email and any attachments.
Please note that the content of this email or any of its attachments may 
contain data that falls within the scope of the Data Protection Acts and that 
you must ensure that any handling or processing of such data by you is fully 
compliant with the terms and provisions of the Data Protection Act 1984 and 
1998.


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

Reply via email to