问题描述
我的项目目录结构是这样的: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 中的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!