Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to make my game program run , just in double click ?

 
naved momin
Ranch Hand
Posts: 692
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ?
 
Maneesh Godbole
Saloon Keeper
Posts: 11185
15
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
naved momin
Ranch Hand
Posts: 692
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11185
15
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rightclick on your executable jar. Select open with. You will see it is associated with javaw. Change it to java.
 
Rob Spoor
Sheriff
Pie
Posts: 20667
65
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Maneesh Godbole
Saloon Keeper
Posts: 11185
15
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
True Rob. But the OP requires
only double click should start that game
 
naved momin
Ranch Hand
Posts: 692
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 20667
65
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic