Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

command line

  Asked By: Pamela    Date: Jan 28    Category: Java    Views: 1011
  

how can i run my program without cmd (command line).

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Dustin Dean     Answered On: Jan 28

In Windows OS, you can run  an executable jar with a double click, as
long as you have set the path to the java runtime executables in the
environment variables. This method does not open a cmd window, so
you won't see any error messages if you run into some.

Alternatively, you could create a .cmd file containing the commands
you would normally type into the cmd window, each followed by a
carriage return. If you don't want the commands to be seen as they
are executed, start the file with "@echo off". This method does
open a cmd window, so any messages sent to System.out will be seen.

I have distributed programs using both methods with equal success.

See this website for steps to make an executable jar:
csdl.ics.hawaii.edu/.../jar-files.html

 
Didn't find what you were looking for? Find more on command line Or get search suggestion and latest updates.




Tagged: