java - Make a Jar File an Application -
this question has answer here:
- create exe jar file , resources 1 answer
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
Post a Comment