I am new to Java world. I have few classes which are inside nested folders (namespace).
My namespace has following folder structure (Assume that companyName folder is on C:\ ):
My problem is, I want to compile all of these classes from command prompt.
I tried the following command but its not working :
but its not working. I am getting following error :
Please help to compile all of these classes and possibly to create jar out of it.
Chandrashekhar Kotekar wrote:0 down vote favorite
Chandrashekhar, please BeForthrightWhenCrossPostingToOtherSites
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:
You could then run the compiler with:
C:> javac @sourcefiles
To me if you aren't willing to use an IDE then this seems like the best option.......list your files in one place and then just run command once (if i understand this correctly).