Can I use JAVAC to compile a project with multiple files and directories?

百般思念 提交于 2019-11-29 07:02:53

I would look at using Ant to create a build script. It's a little bit of work now but it'll pay off over the lifetime of your project.

javac comes with two options, that might help you her:

-c path/to/one/jar;path/to/another/jar
for libraries and
-s path/to/src/solution/java;path/to/src/test/java
for sourcefiles. It's worth a try.

I'm a little unclear on your specific requirements, but what your asking is almost certainly possible. You might want to take a look at the javac options, and see what you can find that will help you.

http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javac.html#options

For example, for the external .jars you need, those need to be included in your classpath using the -classpath option.

NamshubWriter
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!