[
https://issues.apache.org/jira/browse/HADOOP-7305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13065567#comment-13065567
]
Niels Basjes commented on HADOOP-7305:
--------------------------------------
The sad truth is that java.home is set by ant to the jre instead of the value
of the environment variable JAVA_HOME.
Simple demonstration:
{code}
[niels@hacker ~/src/javahome]$ echo $JAVA_HOME
/usr/java/default/
[niels@hacker ~/src/javahome]$ ls -laF /usr/java/default
lrwxrwxrwx. 1 root root 16 Jul 11 2010 /usr/java/default -> /usr/java/latest/
[niels@hacker ~/src/javahome]$ ls -laF /usr/java/latest
lrwxrwxrwx. 1 root root 21 Jul 11 2010 /usr/java/latest ->
/usr/java/jdk1.6.0_21/
[niels@hacker ~/src/javahome]$ cat build.xml
<?xml version="1.0"?>
<project>
<target name="javahome">
<property environment="env"/>
<echo>${env.JAVA_HOME}</echo>
<echo>${java.home}</echo>
</target>
</project>
[niels@hacker ~/src/javahome]$ ant javahome
Buildfile: /home/niels/src/javahome/build.xml
javahome:
[echo] /usr/java/default/
[echo] /usr/java/jdk1.6.0_21/jre
BUILD SUCCESSFUL
Total time: 1 second
{code}
> Eclipse project files are incomplete
> ------------------------------------
>
> Key: HADOOP-7305
> URL: https://issues.apache.org/jira/browse/HADOOP-7305
> Project: Hadoop Common
> Issue Type: Improvement
> Components: build
> Reporter: Niels Basjes
> Assignee: Niels Basjes
> Priority: Minor
> Fix For: 0.22.0
>
> Attachments: HADOOP-7305-2011-05-19.patch,
> HADOOP-7305-2011-05-30.patch, HADOOP-7305-2011-06-09.patch,
> HADOOP-7305-2011-07-01.patch
>
>
> After a fresh checkout of hadoop-common I do 'ant compile eclipse'.
> I open eclipse, set ANT_HOME and build the project.
> At that point the following error appears:
> {quote}
> The type com.sun.javadoc.RootDoc cannot be resolved. It is indirectly
> referenced from required .class files
> ExcludePrivateAnnotationsJDiffDoclet.java
> /common/src/java/org/apache/hadoop/classification/tools line 1 Java Problem
> {quote}
> The solution is to add the "tools.jar" from the JDK to the
> buildpath/classpath.
> This should be fixed in the build.xml.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira