Java Eclipse: Difference between exporting as a JAR and exporting as a Runnable JAR

前端 未结 4 1125
旧巷少年郎
旧巷少年郎 2020-12-12 16:03

What is the difference in eclipse between exporting as a JAR file and exporting as a Runnable JAR file? Aren\'t they both runnable? What are the pros/cons of each?

4条回答
  •  爱一瞬间的悲伤
    2020-12-12 16:37

    In my case, I used to export as a jar when I had all main class and all the libraries path directory specified in the manifest.mf . If many applications are using same library it is unnecessary to export shared library for each jar. It makes running jar faster. But, many times due to configuration issue in different server class-path cannot access library and in that case it makes sense to export the runnable jar that makes file slow to execute and large.

提交回复
热议问题