• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

DOS window still coming when I run the Application using javaw

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am running xindice using javaw but ,it is still showing the DOS window.Can any body tell me how can I come over it..
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello do you know why javaw is used for...it is used to open the executable jar file.
please study the documentation..if you dont have doc please refer me..Okay
:-)
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
have you tried adding 'start'?
as in:
start javaw my.App
I don't actually care enough to go find out the diffence, but this is what i generally do.
 
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
I've been avoiding this one but start doesn't work either. I tried writing a small java boot program that used "start java prog" but it threw an exception in Win32Process. I even tried writing a C++ boot program to do the same thing using CreateProcess and it just sat there looking stupid: the java VM never started. The only other possibility I can think of is to write a C++ program and use spawn and then cut the parent loose from the child and then have the parent exit.
Boy some things are so much easier to do in Unix/Linux!
Michael Morris
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK, I was lazy and didn't state that I believe 'start' only works in NT/2k/XP.
I know it works in some cases and these are the only ones I've tested it in.
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, I am a bit confused. How are you running javaw xindice in the first place? From a batch file? I don't think that javaw is intended to get rid of the DOS screen as in it does not appear. I know that when you launch a java program using javaw from the DOS prompt, then you can close that DOS prompt without terminating the java application. It is the same as saying:
java xindice &
in linux. It runs the app as a seperate process from the DOS window.
Now, I have noticed that when running a batch file that uses javaw, in Windows 95, the DOS window opens then closes almost immediatly. But on Windows XP the DOS window stays open and I just have to close it.
Have not tested on other OS's.
[ August 08, 2002: Message edited by: Gregg Bolinger ]
 
Michael Morris
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi David,
I'm using Win 2k Pro. Can't get rid of the damn command window no matter what I try. Batch files, boot programs, start, javaw, whatever. Another big problem with this is that just closing the command window will kill the VM that it owns without notifying it. So you can't prevent a user from shutting down, possibly leaving your program in a state of disarray. I hope someone comes up with a solution for this.
Michael Morris
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Michael Morris:
Hi David,
Another big problem with this is that just closing the command window will kill the VM that it owns without notifying it. So you can't prevent a user from shutting down, possibly leaving your program in a state of disarray.
Michael Morris


This is not true if you use JAVAW to launch you application.
 
Michael Morris
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I just tried using "javaw" and my java boot program does work using "javaw" instead of "start java" but as Greg indicated on NT Kernal machines you have to manually close the command box.
Here's the boot program:

Of course it wouldn't be too dificult to pass the class file and any parameters for it in main's args, instead of a hardwiring it.
Michael Morris
 
This. Exactly this. This is what my therapist has been talking about. And now with a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic