java - Make a Jar File an Application -


this question has answer here:

how make jar file application? like, when(on os) right-click, selected open with. jar files, far know, don't that. act file, not application. how make jar act application? like, when want open file jar, won't - sees jar file, not application.

is there way can this?

yes of course.

your jar need have meta-inf folder , in folder must create file name "manifest.mf" kind of content :

manifest-version: 1.0  created-by: 1.4.1_01 (sun microsystems inc.)  main-class: start  class-path: ./archive1.jar ./archive2.jar  

the main class must qualifed (com.foo.bar.mainclass).

you can automatically create ide. in eclipse, right clic on project > export > java > runnable jar file, select launch configuration , enter destination jar file.

if want more information can read java tutorials oracle : http://docs.oracle.com/javase/tutorial/deployment/jar/index.html


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -