Java App User’s Tip
Are you tired of that ugly console window that comes up when you open a Java desktop application on Windows?
One way to deal with it as a developer is to use one of these to create a transparent launcher for you. But here’s a relatively easy way that an app user can do it, and not need to know anything about Java app development. Go find the .bat file that’s used to open your Java application, and edit it in your favorite text editor. Find the line that looks something like this:
java -jar app.jar
It may be more complex than that, so you may have to brush up a bit on how .bat files work. Once you’ve found it, put the word “start” in front of it so it looks like this:
start java -jar app.jar
Voila! The command prompt window goes away shortly after it’s brought up. If for some reason it hangs around longer than you want, make a shortcut to it, then change its “Properties > Shortcut > Run” to Minimized. That way if the console’s busy before it launches Java, at least it stays minimized down in the task bar while it’s up.
The javaw utility is supposed to deal with this, but I’ve noticed it doesn’t always work. I’d appreciate hearing about the cases in which it does or doesn’t, in the event that I publish a Java app down the road. Most of the stuff I’ve had to deal with has been server side.
Bring up a console window and type “help start” for more details on what Windows is doing. And if you’re a Java app developer, please do this!
Comments »
No comments yet.
RSS feed for comments on this post.
Leave a comment
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>