Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

pbw

macrumors newbie
Original poster
May 18, 2006
12
0
I have downloaded the latest Java update, and the associated devdocs from ADC, and installed them. In the devdocs are the src.jar and docs.jar, at /System/Library/Frameworks/JavaVM.Framework/Versions/1.6.0/Home.

The docs.jar contains the compressed Java API docs, but is there a "Mac" way to access the APIs? I have extracted them and put them in a convenient location, so that I can access then with a browser, which is my most frequent way of looking at them. Is there another way?
 

wrldwzrd89

macrumors G5
Jun 6, 2003
12,110
77
Solon, OH
Do you use an IDE for your Java development? If you do, which one? The way you set up your IDE to look at the documentation depends on which IDE you use.
 

pbw

macrumors newbie
Original poster
May 18, 2006
12
0
Thanks for the reply.

Yes, I use NetBeans and IntelliJ. I have no problem with setting up the docs for use in the IDEs - just tell them where the jar file is.

However, I frequently just browse the Javadocs, especially when I'm trying to find the right classes to do a particular job. That's when being able to browse with a browser comes in handy.
 

duggram

macrumors 6502
Apr 17, 2008
390
11
Now I don't understand your question. If you can access the JavaDocs from the IDE and you can browse them with your browser, what are you looking for?
 

iShater

macrumors 604
Aug 13, 2002
7,026
470
Chicagoland
Since a browser cannot read the contents of JARs, you will have to extract the java doc contents into a directory of your choice and view the HTML files from there.
 

pbw

macrumors newbie
Original poster
May 18, 2006
12
0
Since a browser cannot read the contents of JARs, you will have to extract the java doc contents into a directory of your choice and view the HTML files from there.

Exactly, and that's what I have done. My question is whether there is a procedure in place for doing just this, and putting the expanded docs into a standard location. It seems a bit of an oversight for Apple not to provide such a mechanism when they bundle up the src and the docs.

I saw a reference to a shell script that extracted the docs, in a thread from about 2002/3, for a much earlier version of Java, obviously. I was wondering whether there was a modern equivalent.
 

iShater

macrumors 604
Aug 13, 2002
7,026
470
Chicagoland
Exactly, and that's what I have done. My question is whether there is a procedure in place for doing just this, and putting the expanded docs into a standard location. It seems a bit of an oversight for Apple not to provide such a mechanism when they bundle up the src and the docs.

I saw a reference to a shell script that extracted the docs, in a thread from about 2002/3, for a much earlier version of Java, obviously. I was wondering whether there was a modern equivalent.

JARs are just zip files. Either use terminal to extract the contents or use a zip utility to extract it. I don't think there is really an "official" procedure for this.
 

sammich

macrumors 601
Sep 26, 2006
4,305
268
Sarcasmville.

pbw

macrumors newbie
Original poster
May 18, 2006
12
0

gwynevans

macrumors newbie
Jul 29, 2009
7
0
However, I thought there might be a "mac way". Apparently not. I just found this:
http://confluence.concord.org/display/CCTR/Get+local+copies+of+Mac+OS+X+Java+source+code+and+Javadoc

I'm in the same position! It looks as if there used to be a unjarJavaDocumentation.sh for earlier versions, that unpacked to roots such as /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Resources/Documentation/Reference/doc/api/, but I've no idea where that would come from. (There's a Javadoc dashboard widget that looks in the above & equivalent roots for 1.4.2 & 1.6).
 

pbw

macrumors newbie
Original poster
May 18, 2006
12
0
I'm in the same position! It looks as if there used to be a unjarJavaDocumentation.sh for earlier versions, that unpacked to roots such as /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Resources/Documentation/Reference/doc/api/, but I've no idea where that would come from. (There's a Javadoc dashboard widget that looks in the above & equivalent roots for 1.4.2 & 1.6).

That's good to know. In that case, I'll try dropping the expanded docs into Resources/Documentation.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.