轉載自:http://space.itpub.net/8183550/viewspace-683859
今天在搭建HADOOP環境編譯的時候,報錯:
compile-core-classes:
[javac] Compiling 386 source files to F:\hadoop\common\trunk\build\classes
[javac] F:\hadoop\common\trunk\build\src\org\apache\hadoop\package-info.java:5: 未結束的字串字面值
[javac] user="boliang-pcboliang
[javac] ^
[javac] F:\hadoop\common\trunk\build\src\org\apache\hadoop\package-info.java:6: 需要為 class、interface 或 enum
[javac] ", date="Sun Jun 27 09:16:51 2010", url="file:///cygdrive/f/hadoop/common/trunk",
[javac] ^
[javac] F:\hadoop\common\trunk\build\src\org\apache\hadoop\package-info.java:6: 需要為 class、interface 或 enum
[javac] ", date="Sun Jun 27 09:16:51 2010", url="file:///cygdrive/f/hadoop/common/trunk",
[javac] ^
[javac] 3 錯誤
解決辦法:
開啟build.XML,注釋掉
<exec executable="sh">
<arg line="src/saveVersion.sh ${version} ${build.dir}"/>
</exec>
部分,刪除package-info.java檔案,重新編譯,一切ok。
這樣就解決問題了。