Board index » jbuilder » javaw vs. java

javaw vs. java


2005-07-26 09:44:48 PM
jbuilder18
Hi,
I have "deployed" (i.e. sent internal for test) with a bat-file starting
my jar file.
Line in bat-file:
javaw -classpath
".\classes\jdsserver.jar;.\classes\comm.jar;.\MYFILE.jar" myfile.MYFILE
I just got a call that it didn't start.
Checked java ver. 1.4 - OK.
It started with "java" instead of "javaw".
I got javaw from jBuilder and it has worked so far and therefore never
thought about it.
Should I use java instead of javaw or is it a way in the bat file to try
java if javaw doesn't work.
Cnofeusd ...
 
 

Re:javaw vs. java

Magnus wrote:
Quote
Hi,

I have "deployed" (i.e. sent internal for test) with a bat-file starting
my jar file.
Line in bat-file:
javaw -classpath
".\classes\jdsserver.jar;.\classes\comm.jar;.\MYFILE.jar" myfile.MYFILE

I just got a call that it didn't start.
Checked java ver. 1.4 - OK.

It started with "java" instead of "javaw".

I got javaw from jBuilder and it has worked so far and therefore never
thought about it.

Should I use java instead of javaw or is it a way in the bat file to try
java if javaw doesn't work.

Cnofeusd ...
java = console application
javaw = windows application with no console
java is fine for development/debugging. I would always use javaw for a
production deployment.
--
Regards,
Lori Olson [TeamB]
------------
Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.
Google Advanced Newsgroup Search
www.google.ca/advanced_group_search
Other Newsgroup Searches:
www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
www.visi.com/~gyles19/fom-serve/cache/1.html
 

Re:javaw vs. java

Lori M Olson [TeamB] wrote:
Quote
Magnus wrote:

>
>Should I use java instead of javaw or is it a way in the bat file to
>try java if javaw doesn't work.
>

java = console application
javaw = windows application with no console

java is fine for development/debugging. I would always use javaw for a
production deployment.

Thanks, It looks like I'm doing this right :)
Just to be sure, when you write "console application", I don't know what
you mean. Is this when to start it from a DOS-window (like my bat-file
does)?
 

{smallsort}

Re:javaw vs. java

Magnus wrote:
Quote
Lori M Olson [TeamB] wrote:

>Magnus wrote:
>
>>
>>Should I use java instead of javaw or is it a way in the bat file to
>>try java if javaw doesn't work.
>>
>
>java = console application
>javaw = windows application with no console
>
>java is fine for development/debugging. I would always use javaw for
>a production deployment.
>

Thanks, It looks like I'm doing this right :)

Just to be sure, when you write "console application", I don't know what
you mean. Is this when to start it from a DOS-window (like my bat-file
does)?

The "console" will appear, whether you want it or not, when you run
java.exe. . An example of this is when you run "JBuilder.exe" instead
of "JBuilderW.exe". You get a console window, in addition to the
JBuilder application window.
If you start java.exe from a console (command-line), then it will just
use that console. But if you start java.exe from a shortcut, you will
get a console window. Using javaw.exe will not give you this console
window.
--
Regards,
Lori Olson [TeamB]
------------
Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.
Google Advanced Newsgroup Search
www.google.ca/advanced_group_search
Other Newsgroup Searches:
www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
www.visi.com/~gyles19/fom-serve/cache/1.html
 

Re:javaw vs. java

Lori M Olson [TeamB] wrote:
Quote
Magnus wrote:

>Lori M Olson [TeamB] wrote:
>
>>Magnus wrote:
>>
>>>
>>>Should I use java instead of javaw or is it a way in the bat file to
>>>try java if javaw doesn't work.
>>>
>>
>>java = console application
>>javaw = windows application with no console
>>
>>java is fine for development/debugging. I would always use javaw for
>>a production deployment.
>>
>
>Thanks, It looks like I'm doing this right :)
>
>Just to be sure, when you write "console application", I don't know
>what you mean. Is this when to start it from a DOS-window (like my
>bat-file does)?
>

The "console" will appear, whether you want it or not, when you run
java.exe. . An example of this is when you run "JBuilder.exe" instead
of "JBuilderW.exe". You get a console window, in addition to the
JBuilder application window.

If you start java.exe from a console (command-line), then it will just
use that console. But if you start java.exe from a shortcut, you will
get a console window. Using javaw.exe will not give you this console
window.
Super! I did not know this.
I can use that so if I put in a lot of System.out.print ..., they will
not show if they start javaw. If they have a problem I could ask them
(or send them another bat-file) with java, they can se the printout and
copy and past in an e-mail to me.
Thanks!