汉化后eclipse查看类源码出现failed to create the part's controls的解决方法

查看源码的方法是在需要查看的类上面点一下,然后ctrl+鼠标左键

今天尝试的时候发现出现了failed to create the part's controls的问题:

汉化后eclipse查看类源码出现failed to create the part's controls的解决方法

第一:是因为汉化的问题,我的eclipse之前是汉化了,于是在eclipse的目录下找到eclipse.ini,然后在最后加上下面的这句代码:
-Duser.language=en

第二:重启eclipse之后测试,又报错source not found。

发现jdk目录下找不到src.zip文件,有可能是把jre当成jdk了。添加JDK,指定src.zip位置。如下图:

汉化后eclipse查看类源码出现failed to create the part's controls的解决方法汉化后eclipse查看类源码出现failed to create the part's controls的解决方法汉化后eclipse查看类源码出现failed to create the part's controls的解决方法汉化后eclipse查看类源码出现failed to create the part's controls的解决方法

第三:把一里面加的那行代码删掉,然后测试之后发现汉化状态下仍然可以查看源码!