本文介绍了Eclipse错误...无法解析为类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我收到错误:com.ibm .ivj.eab.dab.DatastoreJDBC无法解析为一个类型。



我有* .class文件位于com / ibm / ivj / eab / dab文件夹中(确切地我发现他们)。我已经尝试创建一个jar文件,并通过添加外部jar添加到构建路径,我也尝试添加一个外部类文件夹,并指向包含有关com目录的文件夹。



仍然,错误仍然存​​在。奇怪的是,如果我开始输入包名,eclipse实际上是为我自动完成的类! (如下图)。任何想法将不胜感激。也许这些类被编译为一个更老的java版本,这是造成麻烦?也许有一些我需要做的,以确保这些类最终在WEB-INF / lib目录中?



解决方案

右键单击您的项目名称。单击属性。单击Java构建路径。单击添加类文件夹。然后选择你的班级。或者,添加罐应该工作,虽然你声称你尝试了。此外,你是否尝试关闭并重新启动? (重新启动Eclipse)。


I have a dynamic web project that I am working on to migrate a jsp/servlet app from JRun to Tomcat.

I am getting the error: com.ibm.ivj.eab.dab.DatastoreJDBC cannot be resolved to a type.

I have the *.class files sitting inside a com/ibm/ivj/eab/dab folder (exactly how I found them). I have tried creating a jar file and adding that to the build path via "Add External Jar", I have also tried adding an "External Class Folder" and pointing to the folder that contains the "com" directory in question.

Still, the error persists. What is strange is if I start typing the package name eclipse actually auto-completes the class for me! (pictured below). Any ideas would be greatly appreciated. Maybe the classes were compiled for a much older java version and that is causing trouble? Maybe there is something I need to do to ensure the classes end up in the WEB-INF/lib directory?

I

解决方案

Right click your project name. Click properties. Click Java Build Path. Click on Add Class Folder. Then choose your class. Alternatively, add jars should work although you claim that you attempted that. Also, "have you tried turning it off and back on again"? (Restart Eclipse).

这篇关于Eclipse错误...无法解析为类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-29 14:03