简体   繁体   English

Java 类不会在 Eclipse 中打开

[英]Java classes won't open in Eclipse

I've tried cleaning and validating my project, restarting both Eclipse and my computer and my java class files won't open in the editor.我已经尝试清理和验证我的项目,重新启动 Eclipse 和我的计算机,我的 java 类文件不会在编辑器中打开。 Also, I've tried deleting the project from my workspace and reimporting it and no luck.此外,我尝试从我的工作区中删除该项目并重新导入它,但没有成功。 Does anyone know what it might be?有谁知道它可能是什么?

Window -> Reset Perspective 对我有用

Try this Right Click on File -> Open With -> Java Editor试试这个Right Click on File -> Open With -> Java Editor

在此处输入图片说明

Make sure you are in the Java perspective.确保您处于Java perspective.

在此处输入图片说明

Try cleaning eclipse.尝试清洁日食。 Start eclipse with开始日食

eclipse --clean

Hope this helps.希望这会有所帮助。

make sure that a single click is selected for open mode.确保为打开模式选择了单击。 if you go to preference setting, it will be the first thing you will see如果您转到首选项设置,它将是您看到的第一件事

在此处输入图片说明

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

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