简体   繁体   English

java.util.Map $ Entry尚未解决

[英]java.util.Map$Entry unresolved

I'm writing a mod (attempting) and an error I have never before seen pops up on my package deceleration screaming 我正在写一个mod(尝试),并且我从未见过的错误突然出现在我的包裹减速尖叫中

"The type java.util.Map$Entry cannot be resolved. It is indirectly referenced from required .class files" “无法解析类型java.util.Map $ Entry。它是从所需的.class文件中间接引用的”

As far as I know requesting help in the direction of minecraft is a no no but I think this qualifies as a java question 据我所知,向我的世界方向求助是不行,但我认为这符合Java问题。

package com.DGmoN.mysticPower.items;

import java.util.Set;

import com.DGmoN.mysticPower.lib.Strings;

import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemPickaxe;
import net.minecraft.item.ItemTool;

public class MPIPickAxe extends ItemPickaxe {

    protected MPIPickAxe() {
        super(ToolMaterial.EMERALD);
        setUnlocalizedName("MysticPickAxe");
        setTextureName(Strings.MODID + ":" + getUnlocalizedName());
        setCreativeTab(CreativeTabs.tabMisc);
    }

}

Running jdk1.8.0_05 Eclipse Indigo, I haven't used any thing I know of in the direction of the Map thingy. 在运行jdk1.8.0_05 Eclipse Indigo时,我还没有使用我所知道的任何东西来进行Map件事。

您指向错误的jdk,请检查jdk路径并清理构建。

This error only occurs when you don't point to correct jdk. 仅当您不指向正确的jdk时,才会发生此错误。 Check jdk path and clean build your project. 检查jdk路径并清理构建项目。

I have found a different question , the error is similar, and it works, the problem wasnt my jdk but my IDE. 我发现了一个不同的问题 ,错误类似,并且可以正常工作,问题不是我的jdk,而是我的IDE。 Ive changed to Kepler and all my problems are gone 我已经换成了开普勒,我所有的问题都解决了

I got the same error when I moved my project from JRE6 to JRE8 directly in eclipse. 当我直接在eclipse中将项目从JRE6移到JRE8时,出现了相同的错误。 To resolve this error, I have installed JRE7 and first compiled the code with JRE7 and later with JRE8. 要解决此错误,我已经安装了JRE7,首先使用JRE7编译了代码,然后使用JRE8编译了代码。 My issue got resolved, give a try if this helps you. 我的问题已解决,如果有帮助,请尝试。

项目>属性>库>选择jre系统库>编辑>已安装的jre>选择>编辑>并在jre home中尝试更改Java的较低版本,例如JRE home(C:\\ Program Files(x86)\\ Java \\ jre1.5.0_22 ),并将JRE命名为jre1.5.0_22,并很可能完成了已解决的问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM