软件包不存在-Eclipse [英] Package Does Not Exist - Eclipse

查看:78
本文介绍了软件包不存在-Eclipse的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对Java还是陌生的,因此,如果它有一个简单的解决方案,请原谅我(不过我希望如此).在尝试导入com.abc时,我已经在eclipse中将以前编码的.java类文件添加到了我现有的项目中.和 ctrl + space 甚至显示了这些包和类.

I am new to Java so please forgive me if this has a simple solution (and I hope so though). I have added previously coded .java class files to my existing project in eclipse, while trying to import com.abc. and ctrl+space it even shows these packages and classes.

但是,当我尝试编译时,它说包xxx不存在".我已经花了数小时研究这个问题,但是大多数解决方案都集中在.JAR文件上,但是我没有jar文件.我什至尝试创建一个.JAR文件,然后导入,但是我认为我无法成功做到这一点.

However when I try to compile it says "package xxx does not exist". I've spent hours researching on this but most of the solutions focus on .JAR files and I don't have a jar file. I even tried creating a .JAR file and then importing but I think I couldn't manage to success that.

我真的需要帮助,谢谢您的帮助.问候

I really need help about this and thanks for your help. Regards

推荐答案

首先,您需要了解如何在eclipse项目中添加jar文件.您可以将jar文件放置在webinf lib文件夹中.然后,您可以配置项目构建路径.通过

First of all you need to understand how to add jar files in eclipse project. You can place you're jar files in webinf lib folder. And after that you can configure the project build path. By

Right click on project (in eclipse project explorer) > buildpath > you find configure build path.

这篇关于软件包不存在-Eclipse的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆