PDA

View Full Version : Where are the standard java classes found in 10.4?




dsspence
Feb 14, 2007, 11:12 PM
I'm just trying to find any of the default classes installed by java, like stringbuffer, io, any of those. I haven't changed my classpath to java or anything I just need to analyze a few of these classes but can't seem to locate them on my hard disk.



plinden
Feb 14, 2007, 11:29 PM
/System/Library/Frameworks/JavaVM.framework/Versions

dsspence
Feb 14, 2007, 11:56 PM
Sad to say I've been there already and can't find anything in any of the 1.x folders or in the current folder :(

plinden
Feb 15, 2007, 12:00 AM
Look for classes.jar, in Terminal cd to the directory that's in, type: jar tfv classes.jar

For instance: /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes

By the way, why are you doing this? It's a standard Java install with the standard Java classes and their implementations. You can see exactly what's available by looking up the API JavaDocs - for example:
http://java.sun.com/j2se/1.4.2/docs/api/index.html
http://java.sun.com/j2se/1.5.0/docs/api/index.html

dsspence
Feb 15, 2007, 12:07 AM
Well for my data structures class we have to write our own stringbuffer class and are supposed to use the premade one for reference. Thanks for your help.

dsspence
Feb 15, 2007, 12:10 AM
Also how am i supppsed to view the actual code from any of these files?

plinden
Feb 15, 2007, 12:13 AM
http://www.google.com/search?hl=en&q=java+JDK+source+code&btnG=Search

dsspence
Feb 15, 2007, 12:29 AM
OK i think it's all worked out, I really appriciate this.