Eclipse-无法解析阵列 [英] Eclipse - Arrays cannot be resolved

查看:128
本文介绍了Eclipse-无法解析阵列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将Eclipse Helios与Java 8 JDK结合使用。我已经在系统和程序中做了Path的事情。但这是我到目前为止遇到的唯一一个错误。我无法使用Ctrl + Shift + O导入数组。当我手动进行操作时,它给了我这个错误。 无法解析数组

I'm using Eclipse Helios with Java 8 JDK. I already did Path thing in System and in program. But this is the only one error i get so far. I can't import Arrays using Ctrl+Shift+O. When i did manualy it give me this error. "Arrays cannot be resolved"

这是我的代码;

package dizi;

import java.util.Arrays;

public class dizibir {

        public static void main(String[] args) 
        {
            int[] dizi= {1,6,8,3};
            Arrays.sort(dizi);
            for(int i=0; i<dizi.length; i++)
                System.out.println(dizi[i]);

    }

}

这在Eclipse上;

It's looks like this on Eclipse;

编辑:下载最新版本的Oxygen build后,现在可以使用。多谢您的协助。祝你今天愉快。谢谢。

After downloading lates Oxygen build it works now. Thank you for all help. Have a nice day. Thanks.

推荐答案

您的项目的编译器合规性级别(正确-单击项目:属性:Java编译器与您使用的 Java 8 JRE不兼容:< = 1.6与1.8 (您的IDE太旧,无法读取Java 1.8类文件格式)。

Your compiler compliance level of your project (right-click on project: Properties: Java Compiler) is not compatible with the Java 8 JRE you are using: <=1.6 vs. 1.8 (your IDE is too old to be able to read the Java 1.8 class file format).

要么安装并使用较旧的Java JRE(您的旧Eclipse IDE只能最多可处理Java 6)或使用最新的Eclipse Java IDE (推荐):

Either install and use an older Java JRE (your very old Eclipse IDE can only handle up to Java 6) or use the latest Eclipse Java IDE (recommended):


  1. 下载来自 Java开发人员的Eclipse IDE nofollow noreferrer> http://www.eclipse.org/downloads/eclipse-packages/

  2. 解压缩并运行Eclipse

  1. Download the latest Eclipse IDE for Java Developers from http://www.eclipse.org/downloads/eclipse-packages/
  2. Unzip and run Eclipse

这篇关于Eclipse-无法解析阵列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆