• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

open Cmd program by double click

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi to all,

I exported my project into a .jar using eclipse. The problem or question I have is, if it is possible to make my program (which runs on the cmd) by just double clicking on the jar file. Cause at the moment i have to run it by opening the cmd myself, go the directory of the jar and input "java -jar myproj.jar"

Thanks in advance
 
Bartender
Posts: 825
5
Python Ruby Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can create a batch file (under Windows) or a shell script (*nix) that you can use to run your console application. E.g., for Windows:

Save it under a name with .bat extension, and you'll have the desired result - double click on this file will run your application.
 
Marco Galea
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Kemal Sokolovic wrote:You can create a batch file (under Windows) or a shell script (*nix) that you can use to run your console application. E.g., for Windows:

Save it under a name with .bat extension, and you'll have the desired result - double click on this file will run your application.



Worked Great Thank you very much
 
Kemal Sokolovic
Bartender
Posts: 825
5
Python Ruby Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You are welcome!
 
Bartender
Posts: 3323
86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Under Windows you can also associate files of type .jar with java.exe and then you can double click the jar to get it to run.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic