This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
Campbell Ritchie wrote:Do you have a package name in your .java files?
asterisks for all the subpackages that I have. Any idea how to compile the package without having to know/indicate all the package paths? Thanks.
Joined: Oct 13, 2005
If you really want to compile the whole lot at once, navigate to a directory, and copy all the .java files into that same directory.
javac -d . *.java
You will find questions about compiling with package names quite frequently. Here is an old thread where I link to an older thread. Doing a search or following those links will (I hope) give you lots more information. If you have lots of files, using an IDE or "ant" may make life easier for you.
works great, of course. But really, learn to use Ant. If your project is complicated enough for you to ask this question, you need to be using a build tool of some kind to make sure the build is done correctly each time.