Java“包不存在"UNIX 中的错误 [英] Java "package does not exist" error in UNIX

查看:77
本文介绍了Java“包不存在"UNIX 中的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的项目目录结构是这样的:ProjectName/coursesRegistration/src/coursesRegistration/util当我在 Eclipse 中执行 "import courseRegistration.util.FileProcessor;" 时它可以工作,但是当我在 UNIX 上尝试这个(使用命令行编译)时,它给了我一个错误,说

My project directory structure is something like this: ProjectName/coursesRegistration/src/coursesRegistration/util When I do "import coursesRegistration.util.FileProcessor;" in Eclipse it works but when I try this on UNIX (using command line compilation) it gives me an error saying

"error: package coursesRegistration.util does not exist".

也许我遗漏了一些非常基本的东西,有人知道可能是什么问题吗?

Maybe I am missing something very basic, does anyone know what may be the problem?

推荐答案

谢谢大家!我刚刚发现运行ant -buildfile build.xml"然后ant run -buildfile build.xml"对你有魔力!

Thank you guys! I just found out running "ant -buildfile build.xml" and then "ant run -buildfile build.xml" does the magic for you!

这篇关于Java“包不存在"UNIX 中的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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