开发者

including required jars in project

开发者 https://www.devze.com 2023-04-12 07:28 出处:网络
I have imported an existing Project into Eclipse IDE . What i observed is that , there are some jars that comes with the Application itself ( For example those jars are ehcache-core-2.4.1.jar , cxf-2.

I have imported an existing Project into Eclipse IDE . What i observed is that , there are some jars that comes with the Application itself ( For example those jars are ehcache-core-2.4.1.jar , cxf-2.2.3.jar , wss4j-1.5.8 and many more) And some jars we manually added into Eclipse using java Buld path --> Libraries ---开发者_JS百科>Add External Jars .

Please tell me , what jars should be part of the Application and what jars we need to manually add using Add External Jars Option ??

Thank you very much .


The question being asked here is bit subjective in nature and it needs a bit more clear context to get clearer answer. However I will make an attempt to provide answer to your query.

You use "Add External Jars" in eclipse option when you know that the environment in which your application jar will be run will have those jar files (added via external jars option) in the classpath of jvm at runtime of application. In case you think that JVM is not going to have the classes in its classpath on which your code has dependency then those classes (may be inside a jar or a folder) should the part of your application. If your application is an executable Jar file then you should have manifest file (see http://en.wikipedia.org/wiki/Manifest_file) mentioning the path to the jar files you have dependency. Adding jar files in eclipse (by just doing "Add Jars" or "Add External Jars") is only meant for your project compilation in eclipse.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号