我有可以使用ant在Windows计算机上构建的Java源代码。 当我将源克隆到linux计算机并尝试运行“ ant local” cmd时,会出现如下错误:
[javac] /home/pi/production-stand/1.4.1.0/src/com/google/protobuf/GeneratedMessage.java:209: error: type argument BuilderType#1 is not within bounds of type-variable BuilderType#2
[javac] extends AbstractMessage.Builder<BuilderType> {
[javac] ^
[javac] where BuilderType#1,BuilderType#2 are type-variables:
[javac] BuilderType#1 extends com.google.protobuf.GeneratedMessage.Builder declared in class com.google.protobuf.GeneratedMessage.Builder
[javac] BuilderType#2 extends com.google.protobuf.AbstractMessage.Builder<?> declared in class com.google.protobuf.AbstractMessage.Builder
[javac] /home/pi/production-stand/1.4.1.0/src/com/google/protobuf/GeneratedMessageLite.java:62: error: type argument BuilderType#1 is not within bounds of type-variable BuilderType#2
[javac] extends AbstractMessageLite.Builder<BuilderType> {
[javac] ^
[javac] where BuilderType#1,BuilderType#2 are type-variables:
[javac] BuilderType#1 extends com.google.protobuf.GeneratedMessageLite.Builder declared in class com.google.protobuf.GeneratedMessageLite.Builder
[javac] BuilderType#2 extends com.google.protobuf.AbstractMessageLite.Builder<?> declared in class com.google.protobuf.AbstractMessageLite.Builder
[javac] /home/pi/production-stand/1.4.1.0/src/ru/omnicomm/fas/tester/Config.java:183: warning: DOMParser is internal proprietary API and may be removed in a future release
[javac] DOMParser dom = new DOMParser();
[javac] ^
我在指向c:\ Program Files(x86)\ Java \ jdk1.7.0_40的窗口下使用eclipse:
c:\Program Files (x86)\Java\jdk1.7.0_40\bin>java.exe -version
java version "1.7.0_40"
Java(TM) SE Runtime Environment (build 1.7.0_40-b43)
Java HotSpot(TM) Client VM (build 24.0-b56, mixed mode, sharing)
在Linux机器上使用的jdk相同:
$ java -version
java version "1.7.0_40"
Java(TM) SE Runtime Environment (build 1.7.0_40-b43)
Java HotSpot(TM) Client VM (build 24.0-b56, mixed mode)
什么会导致此错误?