Disable shell window on win32 when running external command line programs
fernando@lozano.eti.br
fernando@lozano.eti.br
Mon Jun 9 22:52:00 GMT 2003
Hi Ramjit,
On some compilers (like Free Pascal which also uses GNU binutils from Mingw)
that's a matter of adding a link-time switch. Isn't there one we can use on
GCJ, so the user can generate an .EXE header for a console or a windowed app?
[]s, Fernando Lozano
> > 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,
> π) == 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/
>>
More information about the Java
mailing list