This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Disable shell window on win32 when running external command lineprograms
- From: Ranjit Mathew <rmathew at hotmail dot com>
- To: java at gcc dot gnu dot org
- Date: Mon, 09 Jun 2003 15:09:10 +0530
- Subject: Re: Disable shell window on win32 when running external command lineprograms
- References: <200306082112.12240.simon.rutishauser@gmx.ch>
> as up to now I was (due to this mailinglist) able to disable gcj-swt-apps
> showing a console window when started using -mwindows at link-time
>
> but if I now start an external command line program (in this case cdrecord)
> using
>
> Runtime.getRuntime().exec("cdrecord --scanbus");
>
> there pops up a command line window - which is not the case when using the sun
> jre
This problem is also there for a GUI application when it
encounters an exception (as GCJ spawns addr2line and c++filt).
> How can I disable this?
I'm not 100% sure, but quite possibly, modifying the
CreateProcess( ) call in java/lang/natWin32Process.cc
like the following should help:
if (CreateProcess (NULL,
cmdLine,
NULL,
NULL,
1,
- 0,
+ CREATE_NO_WINDOW,
env,
wdir,
&si,
&pi) == 0)
However, it seems that this would not work on Win9x/ME
and for 16-bit MSDOS apps (according to MSDN).
Ranjit.
--
Ranjit Mathew Email: rmathew AT hotmail DOT com
Bangalore, INDIA. Web: http://ranjitmathew.tripod.com/