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'?
--
Cheers,
Herman Jurjus
use javaw insead of java.
Andrey
--
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
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
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
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.
Many thanks to all respondents!
start /b javaw TheClass
That did the trick. And using a shortcut works even nicer.
--
Cheers,
Herman Jurjus
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
> --
> Cheers,
> Herman Jurjus