java.util.Arrays中不能正常工作的Java 8 [英] java.util.Arrays not working java 8
问题描述
我最近更新到我的电脑日食使用Java 8。我有previously一直在使用Java 7中最初的更新似乎正常工作,因为我可以编译和运行一个简单的的Hello World
-program。然而,当我开始导入我一直在努力,所使用的类 java.util.Arrays中的
previous项目中,我得到了像<$ C $错误C>阵列无法解析。我一直有一个类似的问题的PriorityQueue
类说,
类型
了java.util.Comparator
不能得到解决。这是间接要求的.class
文件中引用。
块引用>解决方案我今天碰见真正类似的东西。不知道如果同样的问题,但我所做的是:
打开项目资源管理
右键单击项目
查找配置构建路径
在打开的窗口中,选择库标签
向下滚动到JRE系统库(有我旁边一个红色错误符号),然后单击库中。
在右上方,选择Edit按钮
选择备用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 classjava.util.Arrays
, I got an error likeArrays could not be resolved
. I have been having a similar problem with thePriorityQueue
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屋!