I am compiling them as javac com\pack1\pack2\pack3\one\*.java javac com\pack1\pack2\pack3\one\a\*.java javac com\pack1\pack2\pack3\one\a\b\*.java .. javac com\pack1\pack2\pack3\two\*.java
I want to know is it possible to compile them with a single javac command(or may be lesser number of javac commands) thanks
Ta Ri Ki Sun
Joined: Mar 26, 2002
there's a million and 1 ways, of which I like ant the most. but if you must here's some info...
To shorten or simplify the javac command, you may specify one or more files that themselves contain one filename per line. On the command line, use the '@' character with the filename to specify it as a file list. When javac encounters an argument beginning with the character `@', it operates on the filenames in that file as if they had been on the command line. This enables you to overcome the command-line length limitation of Windows.
For example, you can list all of the source file names in a file named sourcefiles. This file might look like:
MyClass1.java MyClass2.java MyClass3.java
You could then run the compiler with:
C:> javac @sourcefiles
-sourcepath sourcepath Specify the source code path to search for class or interface definitions. As with the user class path, source path entries are separated by semicolons ( and can be directories, JAR archives, or ZIP archives. If packages are used, the local path name within the directory or archive must reflect the package name.