How to pack javadoc and src into a jar-file?

How do I have to pack the javadoc and the sources into a jar-library, so that it is not necessary to attach them in the path-configurations?

5 comments

I hope you find out. I use a huge library (9MB w/max compression). It
has the classes like they are supposed to, but has the source files
under /src and the javadoc under /doc/api. I would love to be able to
get all of this from the jar. BTW, if necessary, I can probably get
them to change where the information is in the jar file.

Norris Shelton
Sun Certified Java Programmer




Urban Spielmann wrote:

>How do I have to pack the javadoc and the sources into a jar-library, so that it is not necessary to attach them in the path-configurations?

>

0

Urban Spielmann wrote:

How do I have to pack the javadoc and the sources into a jar-library, so that it is not necessary to attach them in the path-configurations?

You can pack them into but still forced to assign entries inside as
source and javadoc roots correspondingly. There's no way to do this
automatically since there's no a defined convention for jar-file layout
like this.

--
Maxim Shafirov
JetBrains Inc.
http://www.jetbrains.com
"Develop with pleasure!"

0

I just zipped a docs-tree and added the zip-file to the Javadoc-Tab. The following entry is displayed:

docs.zip!\docs\api(D:\mydir)

When I try to access the doc via Shift-F1 the following Error is displayed:

Malformed url: jar://D:/mydir/docs.zip!/docs/api/com/.../Sequence.html

The displayed path to the html file seems to be correct. Do you have any idea what may be wrong ?

Thanks and regards,

Marc

0

I am confused. Your first statement sounds like it can be done, but
your second sound like it cannot.

Here is what I have in my jar file:
/ is where my classpath is, like normal
/doc is where my javadoc is (can be moved if necessary)
/src is where my java source files are (can be moved if necessary).

I guess what I really need is the ability to specify a jar file and a
directory path (or prefix) inside the jar. Does that seem feasible?

Norris Shelton
Sun Certified Java Programmer




Maxim Shafirov (JetBrains) wrote:

Urban Spielmann wrote:

>
>> How do I have to pack the javadoc and the sources into a jar-library,
>> so that it is not necessary to attach them in the
>> path-configurations?
>

You can pack them into but still forced to assign entries inside as
source and javadoc roots correspondingly. There's no way to do this
automatically since there's no a defined convention for jar-file
layout like this.

>

0

Marc Felsberg wrote:

I just zipped a docs-tree and added the zip-file to the Javadoc-Tab. The following entry is displayed:

docs.zip!\docs\api(D:\mydir)

When I try to access the doc via Shift-F1 the following Error is displayed:

Malformed url: jar://D:/mydir/docs.zip!/docs/api/com/.../Sequence.html

The displayed path to the html file seems to be correct. Do you have any idea what may be wrong ?

Thanks and regards,

Marc

Because external browser doesn't support jar:// protocol. This will only
work with Ctrl+Q (Quick javadoc)

--
Maxim Shafirov
JetBrains Inc.
http://www.jetbrains.com
"Develop with pleasure!"

0

Please sign in to leave a comment.