Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2005

Tip: Looking for answers? Try searching our database.

the nasty black window

Thread view: 
kawa - 19 Oct 2005 07:36 GMT

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,
Andrew Thompson - 19 Oct 2005 07:43 GMT
> 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).
Roedy Green - 19 Oct 2005 09:48 GMT
>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.

Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.

zero - 19 Oct 2005 14:58 GMT
>  
> Hi,
[quoted text clipped - 7 lines]
>
> 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.
kawa - 19 Oct 2005 20:31 GMT

> Since you're talking about exe files I'll assume you're using Windows.
>
[quoted text clipped - 10 lines]
> 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,
Roedy Green - 19 Oct 2005 23:34 GMT
>in a batch file type:
>start javaw Apllication
>
>then make a shortcut to the .bat

That adds unnecessary overhead.  Your shortcut can contain javaw.exe
as the program and application as the parameter.

You don't need a bat file or command interpreter.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.

Roedy Green - 19 Oct 2005 23:33 GMT
On Wed, 19 Oct 2005 13:58:14 GMT, zero <zero@this.hi> wrote or quoted

>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).

yet another way to do it is launch from start | run

Yet another is to put it on the menu.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.