在 Eclipse Luna 中安装 optaplanner 示例

inatalling optaplanner example in eclipse luna

我正在尝试在 eclipse 中安装 optaplanner 示例。我遇到了一些我无法解决的问题:

Software:
Eclipse luna
jdk 1.8
maven 1.6

我还为这个项目使用了 GIT 软件。

主要问题在ConferenceSchedulingXslxFileIOjavaclass.
错误是:

The method getLeft() is undefined for the type Talk 
The method getLeft() is undefined for the type Talk 
The method getRight() is undefined for the type Object  

The method getRight() is undefined for the type Object  
The method getRight() is undefined for the type Object  
The method getRight() is undefined for the type Talk    
The method nextTalkListCell(Iterable<Object>) in the
The type Pair does not define getLeft(Object) that is applicable here   
The type Pair does not define getLeft(Object) that is applicable here   

有人能帮忙吗?

我怀疑您的IDE的java语言设置可能太低。它应该至少设置为 java 8 兼容。请注意,java 语言设置与使用的 JDK 不同(当然,JDK 至少也需要为 8)。

getLeft() 和 getRight() 仅用于 Pair 个实例。因此,除非您更改了源,否则它不会以某种方式弄清楚某些变量是 Pair 类型并且只是认为它是一个对象。最近的 java 语言版本缺乏泛型支持或泛型类型改进可能解释了这一点。