New To Java Libraries - What To Include In A Jar File
I have an Android project which included a class with a file copy method. Out of interest I thought I'd extract this into a (non-android, just plain java) project of its own, as it
Solution 1:
You can include things that are needed at runtime.
For example:
- The .class files contain the compiled code; this is needed at runtime.
- You may also need to include other resources, such as images.
- Sometimes you may find it handy to include a custom META-INF/MANIFEST.MF.
- Sometimes it's useful to include a dynamically linked, native library (e.g., a Windows DLL), but to use it you'll usually need to extract it first to a temporary location.
- Sometimes additional resources are zipped into a jar, such as API documentation for a library.
The .project and .classpath files are not used at runtime. They do not need to be included in the jar file.
Post a Comment for "New To Java Libraries - What To Include In A Jar File"