5

A third party library I'm utilizing provided the JavaDoc HTML and associated bin files in a zip file. How can I create a jar file from the JavaDoc HTML?

Thanks.

4

5 回答 5

8

A JAR file is nothing but a ZIP file with an (optional) manifest file inside.

Basically, rename the file to .JAR and that's it.

于 2009-06-03T15:35:09.680 回答
2

JDK include jar.exe, for windows following path "%JAVA_HOME%/bin/jar.exe"

Supose you have folder

/somelib/
         packages.html
         ... other html

Go to the somelib directory:

cd /somelib/
jar cvf somelib-3.0-javadoc.jar *

After that in /somelib/ you can find somelib-3.0-javadoc.jar

于 2013-09-25T06:22:04.037 回答
1

Quick answer: You can take all the files in a ZIP and put it .jar extension

于 2009-06-03T15:35:06.683 回答
1

By zipping the files and renaming the compressed package .jar? (JAR files are basically just ZIP files.)

But why would you want to create a JAR out of the HTML files?

于 2009-06-03T15:36:15.733 回答
-1

Of course you could just unzip the zip file and add the lib folder you just decompressed to your classpath.

于 2009-06-03T19:57:41.300 回答