Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can we Avoid Dos Prompt

 
narayana murthy pedapudi
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I want to run an application without the dos prompt, i am using some installationsheild by which i am hiding the dos prompt after it comes.
But i don't want this dos prompt should come atall, how can i achieve this, i think i must convet this to an exe. But no idea How to do it.
Please Help in this regards.

Regards
narayana
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can try to execute your programm with javaw instead of java.
Create a batch file and there you call your main class with javaw.
From Sun:
"The javaw command is identical to java, except that with javaw there is no associated console window. Use javaw when you don't want a command prompt window to appear. The javaw launcher will, however, display a dialog box with error information if a launch fails for some reason."
or you can check out this tool:
JExec
 
narayana murthy pedapudi
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Thanks for the information, I could know how to create EXE with that but the Problem is this didn't solve my problem, Whenever i click on the exe a dos prompt is coming, i don't want that dos prompt at all, whenever i click on the exe file my application should run without any dos prompt.
(There should not be any dos prompt in the application at any point of time)
Please Let me know any trial versions which can help me in this regards.
Thanks
narayana
 
David Weitzman
Ranch Hand
Posts: 1365
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If your launcher is a .jar file the user double-clicks on, there's no prompt. If you're compiling the lancher .exe yourself, then look in your compiler's documentation for a command line option that will show or hide the console.
 
VIJAY Yadlapati
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use Javaw.exe instead of Java.exe. Javaw is as same as Java, but it starts the Application in a Window rather than in console.
Pack all your client classes in to a .jar file and write a batch file to invoke the main class in the .jar file using Javaw. This is the mechanism people follow for distributing Java Client Applications.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic