How to Fix “Unsafe cannot be resolved to a type” in

  • 时间:2020-10-12 15:56:23
  • 分类:网络文摘
  • 阅读:195 次

If you have the following two errors building your Java projects using Eclipse,

  • Unsafe cannot be resolved to a type
  • The import sun.misc.Unsafe cannot be resolved

Then, this turns out to be the fix for me.

java-import-sun-misc-unsafe-cannot-be-resolved-to-a-type How to Fix "Unsafe cannot be resolved to a type" in Eclipse/Java? compiler IDE java

The import sun.misc.Unsafe cannot be resolved

Navigate to the project and Select Project – Preferences – Java Compiler – Enable project specific settings – Compiler compliance level = 11 – Use default compliance settings (Ticked)

eclipse-project-properties-java-compiler-enable-project-specific-settings How to Fix "Unsafe cannot be resolved to a type" in Eclipse/Java? compiler IDE java

eclipse-project-properties-java-compiler-enable-project-specific-settings

Apply and Close – then do a full clean rebuild, which will make the errors go away!

–EOF (The Ultimate Computing & Technology Blog) —

推荐阅读:
数学题:下图是一个正方形,边长是6厘米  数学题:求往返的平均速度  同学,很高兴认识你们  我想让校园更美  如果让我选择  考卷儿的秘密|小学作文  那些年一起过的儿童节作文  团队合作,增进感情  低头做人抬头看路  美丽的葡萄园作文 
评论列表
添加评论