• Post Reply Bookmark Topic Watch Topic
  • New Topic

javaw  RSS feed

 
jignesh soni
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
whats "javaw.exe" for ?
Does it get installed automatically with jre ? What is it used for ?
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's the same as java.exe, but it doesn't open stdin/stdout to a console. It's useful for running GUI apps. It's the preferred program for running clickable JAR files.
 
Rob Spoor
Sheriff
Posts: 21135
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd like to think the "w" stands for "windowed", because as Ernest said it should be used for GUI apps - application with a window.
 
Andre Brito
Ranch Hand
Posts: 95
Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ernest Friedman-Hill wrote:It's the preferred program for running clickable JAR files.

Hmm... I'm sorry, but in this case, what's the difference between java -jar and javaw?

Hug.
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java -jar will open a DOS window. javaw won't.
 
jignesh soni
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So if I want to run a byte code using javaw , I can use "javaw bytecode" instead of "java bytecode" , right ?

In what situation shall I opt to use javaw and what is the advantage of using javaw over java ?
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
jignesh soni wrote:
In what situation shall I opt to use javaw and what is the advantage of using javaw over java ?


I've explained it twice now. I think the only way you'll understand is to try it yourself. Set up your machine to run jars by double-clicking to use java.exe, then change it to use javaw.exe. you should see the obvious difference: with java.exe, a console window appears, but with javaw.exe, it does not.
 
Andre Brito
Ranch Hand
Posts: 95
Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ernest,

Thanks for your answer

Hug.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!