| Author |
how to make my game program run , just in double click ?
|
naved momin
Ranch Hand
Joined: Jul 03, 2011
Posts: 675
|
|
i have maked a tiny game program (a command line version ) what i want is that , only double click should start that game ..i have tried making jar and all but to execute that jar we have write a command on the terminal . which i dont want , what i want my file should be a executable so that whenever user double click on that in windows 7 , or xp that file should start running in terminal .
how to do that ? name any software which could help me ?
|
The Only way to learn is ...........do!
Visit my blog http://inaved-momin.blogspot.com/
|
 |
Maneesh Godbole
Saloon Keeper
Joined: Jul 26, 2007
Posts: 8430
|
|
|
The double click operation is associated with executables like javaw on the OS and have nothing to do with your code. If you associate it with java (instead of javaw) you will get the terminal window
|
[Donate a pint, save a life!] [How to ask questions] [Onff-turn it on!]
|
 |
naved momin
Ranch Hand
Joined: Jul 03, 2011
Posts: 675
|
|
Maneesh Godbole wrote:The double click operation is associated with executables like javaw on the OS and have nothing to do with your code. If you associate it with java (instead of javaw) you will get the terminal window
i didnt get you .
|
 |
Maneesh Godbole
Saloon Keeper
Joined: Jul 26, 2007
Posts: 8430
|
|
|
Rightclick on your executable jar. Select open with. You will see it is associated with javaw. Change it to java.
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
But if you change the file association, java.exe will be used for all JAR files, adding a command prompt window for all Java applications.
I'd create a BATCH file and use that to launch the Java application.
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
Maneesh Godbole
Saloon Keeper
Joined: Jul 26, 2007
Posts: 8430
|
|
True Rob. But the OP requires
only double click should start that game
|
 |
naved momin
Ranch Hand
Joined: Jul 03, 2011
Posts: 675
|
|
Rob Spoor wrote:But if you change the file association, java.exe will be used for all JAR files, adding a command prompt window for all Java applications.
I'd create a BATCH file and use that to launch the Java application.
but theres a problem , open with option has java platform se binary ...i didnt find anything like java ro javaw .
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
Maneesh Godbole wrote:True Rob. But the OP requires
only double click should start that game
Then he should double click the BATCH file instead.
naved momin wrote:
Rob Spoor wrote:But if you change the file association, java.exe will be used for all JAR files, adding a command prompt window for all Java applications.
I'd create a BATCH file and use that to launch the Java application.
but theres a problem , open with option has java platform se binary ...i didnt find anything like java ro javaw .
Use the option to browse for the application.
|
 |
 |
|
|
subject: how to make my game program run , just in double click ?
|
|
|