the nasty black window

K

kawa

Hi,
How to get rid of that black system window appearing after executing a java
application with java.exe or javaw.exe?

How to make it not appearing together with an application window created on
the basis of the Frame class?

Is there any class method for that or a parameter for the javaw.exe?

regards,
 
A

Andrew Thompson

kawa said:
How to get rid of that black system window appearing after executing a java
application with java.exe or javaw.exe?

It is no longer a problem if..
- The app. is jar'd and has a manifest specifying main()
(so it becomes 'double click launchable')
- The app. is launched using JWS (icon/menu launchable).
 
R

Roedy Green

Hi,
How to get rid of that black system window appearing after executing a java
application with java.exe or javaw.exe?

I think you are referring to the console, and it should not be
appearing if you use javaw.
 
Z

zero

kawa said:
Hi,
How to get rid of that black system window appearing after executing a
java application with java.exe or javaw.exe?

How to make it not appearing together with an application window
created on the basis of the Frame class?

Is there any class method for that or a parameter for the javaw.exe?

regards,

Since you're talking about exe files I'll assume you're using Windows.

javaw.exe is designed to do exactly what you want, but of course you cannot
invoke it from the command line (ie in a "dos window") because then that
window will remain (although you can close it).

To have only the frame and no console window, you need to create a shortcut
in the folder that contains the main class. As target type "javaw -
classpath . <your class name>" (without quotation marks).

If javaw is in your path (which it is by default), you can then run your
application using the shortcut, and you won't have a console window.
 
K

kawa

U¿ytkownik "zero said:
Since you're talking about exe files I'll assume you're using Windows.

javaw.exe is designed to do exactly what you want, but of course you
cannot
invoke it from the command line (ie in a "dos window") because then that
window will remain (although you can close it).

To have only the frame and no console window, you need to create a
shortcut
in the folder that contains the main class. As target type "javaw -
classpath . <your class name>" (without quotation marks).

If javaw is in your path (which it is by default), you can then run your
application using the shortcut, and you won't have a console window.

Thank you very much it works.
A guy in pl.comp.lang.java gave me also a good advice

in a batch file type:
start javaw Apllication

then make a shortcut to the .bat

again thank you all very much for you help.
Best Regards,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top