• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 692
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ?
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 22781
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 22781
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic