Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Running jre in Dos

Posted on 2002-05-20
5
Medium Priority
?
267 Views
Last Modified: 2013-11-23
I downloaded the JDK from java.sun.com.  In dos I am using the command java application to run the application.  When the application runs the dos window is still open and shows all my debug statements.  My question is, does anyone know how to hide that dos window while my application is running.  I actually have an icon on my desktop whick I click and then calls a batch file to start off the java application. Is it even possible to hide that dow window and still allow my java application to run?
0
Comment
Question by:mfcrusty
5 Comments
 
LVL 19

Accepted Solution

by:
Jim Cakalic earned 800 total points
ID: 7022204
Have you tried javaw from the distribution? That is exactly the purpose for which it is intended.

Jim
0
 
LVL 9

Expert Comment

by:yongsing
ID: 7023065
You can archive your program .class files into an executable JAR file. On double-clicking the JAR file icon, the program will run. Here is how you create the JAR file. First, create a manifest file, say "test.mf", with the content as follows:

Main-Class: MyClass

MyClass is the name of the class which contains your static main() method. Note that there must be a newline character at the end of the line.

Then archive all the files as follows:

jar cmf0 test.mf Test.jar *.class

where Test.jar is the name of the JAR file, and *.class means all the .class files in the current directory.

Now that you have the JAR file, all you need to run it is to double-click its icon.
0
 
LVL 35

Expert Comment

by:girionis
ID: 7023473
 Yongsing I do not think this is what mfcrusty asked

>  My question is, does anyone know how to hide that dos
> window while my application is running.

  mfcrusty, I would actually go with the solution jim_cakalic has suggested.
0
 

Author Comment

by:mfcrusty
ID: 7027919
Thanks Jim.  I never knew what that was for.  I am a Java certified programmer and I never used javaw.  I always wondered what that command did but it was never required of me to use it.  Thanks again.  
0
 
LVL 19

Expert Comment

by:Jim Cakalic
ID: 7027988
S'okay. There's more there than any of us can possibly remember.

Jim
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses
Course of the Month20 days, 17 hours left to enroll

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question