• Post Reply Bookmark Topic Watch Topic
  • New Topic

hiding console window  RSS feed

 
basha khan
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how can i run java without using command prompt?.or how can i avoid the command prompt window while GUI applications running?.we all know that a console window is not necessory in GUI.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use the javaw.exe program to run your class instead of the java.exe program. They are both in the bin sub-directory of your JDK directory. Javaw runs your program without the command-prompt window... in windows, you would make a shortcut to "<JDK_directory>\bin\javaw.exe -classpath <your_classpath> yourApp", and then you can run your program by clicking on an icon.
 
basha khan
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hai Nate , nice to see u
ur answer is a possible solution but something inside JVM 'll be more better..
System.exit() is exiting the JVM.is there is any Console.exit() like methods which eleminates console window without exiting JVM?. or any tricks?
wishing u a splendid eve
basha
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
javaw is what you want to use. There is no console.exit(). But using javaw will allow the Console window to be closed without termintaing the VM.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!