java.util.Arrays不工作java 8 [英] java.util.Arrays not working java 8
问题描述
hello world
程序。但是,当我开始导入以前使用过的项目时,我使用了类 java.util.Arrays
,我得到一个错误,如数组无法解决
。我有一个类似的问题,与 PriorityQueue
类说,
键入
java.util.Comparator
无法解析。它是从必需的.class
文件间接引用的。
我今天遇到了类似的事情。不知道是否同样的问题,但我所做的是:
打开项目资源管理器
右键单击项目
查找配置构建路径
imgur.com/o7EAT.pngalt =enter image description here>
向下滚动到JRE系统库(我的旁边有一个红色的错误符号)和点击图书馆。
在右上角选择编辑按钮
选择替代JRE,然后选择(在您的情况下)java 8
I recently updated to using Java 8 on my computer for eclipse. I had previously been using Java 7. At first the update seemed to work fine as I could compile and run a simple hello world
-program. However, as I began to import previous projects that I had been working on that used the class java.util.Arrays
, I got an error like Arrays could not be resolved
. I have been having a similar problem with the PriorityQueue
class saying that,
The type
java.util.Comparator
cannot be resolved. It is indirectly referenced from required.class
files.
I ran into something really similar today. Not sure if its the same issue, but what I did was:
Open project explorer
Right click the project
Find "Configure Build Path"
In the window that opens, select the "Libraries" tab
Scroll down to JRE System Library (there was a red error symbol next to mine) and click the library.
In the top right, select the Edit button
Choose "Alternate JRE" and then pick (in your case) java 8
这篇关于java.util.Arrays不工作java 8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!