[英]add java source to ADT eclipse
I am using the eclipse bundle for android on my mac. 我正在Mac上使用eclipse android捆绑包 。 I am writing some code that extends Observable
我正在写一些扩展Observable
代码
extends Observable
When I F3
on Observable
the source was not found. 当我在Observable
执行F3
,找不到源。 I try finding the source in 我尝试在中找到来源
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
But I am not finding the source. 但我找不到来源。 Does anyone know how I can attach the source of core java to ADT eclipse? 有谁知道我如何将核心Java的源代码附加到ADT eclipse?
maybe you should install the JDK instead of JRE, you can find a code directly here 也许您应该安装JDK而不是JRE,您可以直接在此处找到代码
http://developer.classpath.org/doc/java/util/Observable-source.html http://developer.classpath.org/doc/java/util/Observable-source.html
link to download JDK : http://www.oracle.com/technetwork/java/javase/downloads/index.html 下载JDK的链接: http : //www.oracle.com/technetwork/java/javase/downloads/index.html
after installation look for src.zip file in your insall directory 安装后,在insall目录中查找src.zip文件
Since there is no src.zip
in /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
I give that up and decide to use the source for java 7, which is at /Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home
. 由于没有src.zip
在/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
我给这并决定使用Java 7的来源,这是在/Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home
。 Note that /Library
in the second instance is not short for /System/Library
; 请注意,第二个实例中的/Library
不是/System/Library
缩写; they are two different paths. 他们是两条不同的道路。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.