Hello,
Perhaps this is a stupid question.
If you use the usual way to start a Swing GUI
public static void main(String[] args) {
invokeLater(new Runnable() {
public void run() { // etc.
}
});
}
then (at least in Windows), if you start this with a .bat file, you
still see an extra console window. If you close that window, then the
Swing GUI goes away, too. How can i start 'just the Swing GUI'?

Signature
Cheers,
Herman Jurjus
Andrey Kuznetsov - 20 May 2006 08:15 GMT
> Hello,
>
[quoted text clipped - 11 lines]
> see an extra console window. If you close that window, then the Swing GUI
> goes away, too. How can i start 'just the Swing GUI'?
use javaw insead of java.
Andrey

Signature
http://uio.imagero.com Unified I/O for Java
http://reader.imagero.com Java image reader
http://jgui.imagero.com Java GUI components and utilities
VisionSet - 20 May 2006 18:07 GMT
> > Hello,
> >
[quoted text clipped - 13 lines]
>
> use javaw insead of java.
And use the dos START /B command in the bat file if necessary, you need to
on Win2000, as even with javaw the console window remains.
--
Mike W
jcsnippets.atspace.com - 21 May 2006 01:03 GMT
<snipped>
> And use the dos START /B command in the bat file if necessary, you need to
> on Win2000, as even with javaw the console window remains.
Isn't that only when you actually use "start javaw SomeClass" ?
I'd expect not to see a console window on Win2000, when you start an
application with "javaw SomeClass". That's the behaviour I'm used to on my
Win2000 machines.
Best regards,
JayCee
--
http://jcsnippets.atspace.com/
a collection of source code, tips and tricks
Jeffrey Schwab - 21 May 2006 05:58 GMT
> <snipped>
>> And use the dos START /B command in the bat file if necessary, you need to
[quoted text clipped - 5 lines]
> application with "javaw SomeClass". That's the behaviour I'm used to on my
> Win2000 machines.
It's not javaw that opens/maintains the console window VisionSet
mentions, but the cmd.exe interpreter. If a shortcut, rather than a
batch file, is used to launch javaw TheClass, then as you suggest, the
console window won't show up at all.
Herman Jurjus - 22 May 2006 10:13 GMT
>> <snipped>
>>> And use the dos START /B command in the bat file if necessary, you
[quoted text clipped - 12 lines]
> batch file, is used to launch javaw TheClass, then as you suggest, the
> console window won't show up at all.
Many thanks to all respondents!
start /b javaw TheClass
That did the trick. And using a shortcut works even nicer.

Signature
Cheers,
Herman Jurjus
Denis - 22 May 2006 14:58 GMT
Herman Jurjus ha scritto:
> Hello,
>
[quoted text clipped - 11 lines]
> still see an extra console window. If you close that window, then the
> Swing GUI goes away, too. How can i start 'just the Swing GUI'?
Use webstart! Is an xml file with extension .jnlp. Then double click on
the file and the application starts. In the same way you can insert a
link to the jnlp file on an html page.
See
http://java.sun.com/docs/books/tutorial/information/javawebstart.html
DM