Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jul 2, 2009, 04:39 AM   #1
pbw
macrumors newbie
 
Join Date: May 2006
Accessing Java API docs

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?
pbw is offline   0 Reply With Quote
Old Jul 2, 2009, 07:37 AM   #2
wrldwzrd89
macrumors G4
 
wrldwzrd89's Avatar
 
Join Date: Jun 2003
Location: 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.
__________________
iMac Intel (Rev H, 27"), 1TB HDD, 16GB RAM, 10.8.4
wrldwzrd89 is offline   0 Reply With Quote
Old Jul 2, 2009, 08:48 AM   #3
pbw
Thread Starter
macrumors newbie
 
Join Date: May 2006
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.
pbw is offline   0 Reply With Quote
Old Jul 2, 2009, 08:54 AM   #4
duggram
macrumors 6502
 
Join Date: Apr 2008
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?
duggram is offline   0 Reply With Quote
Old Jul 2, 2009, 08:59 AM   #5
iShater
macrumors Demi-God
 
iShater's Avatar
 
Join Date: Aug 2002
Location: 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.
__________________
Insert signature here.
iShater is offline   0 Reply With Quote
Old Jul 2, 2009, 09:02 AM   #6
sammich
macrumors 601
 
sammich's Avatar
 
Join Date: Sep 2006
Location: Sarcasmville.
Are you referring to something like this (http://java.sun.com/javase/6/docs/api/)?
__________________
Official MR IRC
Slow news day? Never fear, Digitimes is here. Serving up free hits for techblogs everywhere.
sammich is offline   0 Reply With Quote
Old Jul 2, 2009, 09:05 AM   #7
iShater
macrumors Demi-God
 
iShater's Avatar
 
Join Date: Aug 2002
Location: Chicagoland
Quote:
Originally Posted by sammich View Post
Are you referring to something like this (http://java.sun.com/javase/6/docs/api/)?
Yep, he wants it local vs. going to the web to access it.
__________________
Insert signature here.
iShater is offline   0 Reply With Quote
Old Jul 2, 2009, 09:06 AM   #8
pbw
Thread Starter
macrumors newbie
 
Join Date: May 2006
Quote:
Originally Posted by iShater View Post
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.
pbw is offline   0 Reply With Quote
Old Jul 2, 2009, 09:07 AM   #9
pbw
Thread Starter
macrumors newbie
 
Join Date: May 2006
Quote:
Originally Posted by iShater View Post
Yep, he wants it local vs. going to the web to access it.
Yep. It's useful to be able to access this stuff when I'm offline.
pbw is offline   0 Reply With Quote
Old Jul 2, 2009, 09:08 AM   #10
iShater
macrumors Demi-God
 
iShater's Avatar
 
Join Date: Aug 2002
Location: Chicagoland
Quote:
Originally Posted by pbw View Post
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.
__________________
Insert signature here.
iShater is offline   0 Reply With Quote
Old Jul 2, 2009, 09:09 AM   #11
sammich
macrumors 601
 
sammich's Avatar
 
Join Date: Sep 2006
Location: Sarcasmville.
Quote:
Originally Posted by pbw View Post
Yep. It's useful to be able to access this stuff when I'm offline.
https://cds.sun.com/is-bin/INTERSHOP...-CDS_Developer

If that link doesn't work then go to http://java.sun.com/javase/downloads/index.jsp and scroll down to find "Documentation". I'm hoping it should be what you're looking for. I followed roughly the same procedure when downloading the v5 api's a couple years back.
__________________
Official MR IRC
Slow news day? Never fear, Digitimes is here. Serving up free hits for techblogs everywhere.
sammich is offline   0 Reply With Quote
Old Jul 2, 2009, 09:42 AM   #12
pbw
Thread Starter
macrumors newbie
 
Join Date: May 2006
I'm new to Macs. On my Linux systems, I would grab the Documentation bundle for a release of the JDK, and unpack it into the JDK directory, so I would have a /docs directory at the top level of the JDK. This was done by hand, so I don't have a problem with that.

However, I thought there might be a "mac way". Apparently not. I just found this:
http://confluence.concord.org/displa...de+and+Javadoc
pbw is offline   0 Reply With Quote
Old Jul 29, 2009, 05:34 AM   #13
gwynevans
macrumors newbie
 
Join Date: Jul 2009
Quote:
Originally Posted by pbw View Post
However, I thought there might be a "mac way". Apparently not. I just found this:
http://confluence.concord.org/displa...de+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).
gwynevans is offline   0 Reply With Quote
Old Jul 29, 2009, 05:15 PM   #14
pbw
Thread Starter
macrumors newbie
 
Join Date: May 2006
Quote:
Originally Posted by gwynevans View Post
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.
pbw is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
getting status messages from facebook using Graph API kingthong iPhone/iPad Programming 2 Jan 21, 2011 04:02 AM
Small Java Problem finnschi Mac Programming 9 Nov 25, 2010 04:26 PM
Java API Documentation BKharns Mac Programming 2 Apr 30, 2010 07:54 AM
XCode Java API search? Helmut Kool Mac Applications and Mac App Store 4 Aug 15, 2004 01:57 PM


All times are GMT -5. The time now is 05:01 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC