• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem in starting the app in double click

 
naved momin
Ranch Hand
Posts: 692
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
within netbeans i have clean and build my GUI app and i have placed the entire code for starting the app in a .bat file so that my client can double click and execute and when i click cmd also start with the app and closing the cmd also closes the app too
is there any other way so that i can make a file whatever so that i client can just double click to start the app ?
 
Maneesh Godbole
Saloon Keeper
Posts: 11021
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You got two options
1) Change it to javaw -jar .... (not really recommended)
2) Make sure your jar is self executable by defining the Main-Class attribute in the manifest file http://download.oracle.com/javase/tutorial/deployment/jar/appman.html
This will make your jar "executable". i.e. the user can double click the jar to launch the application (no need for the batch file)
 
Campbell Ritchie
Sheriff
Posts: 48652
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may need to ensure you have a file association from .jar to the Java™ runtime, but that is often set up automatically by the operating system.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic