I'm using Tomcat7 , jdk 1.7.0_55 & eclipse, when I trying to compile the entire project(Java Code) using COMMAND PROMPT, its showing Error Like javac: invalid flag: D:\COMPILE\lib\activation-1.1.jar. The given below steps are followed to compile the code.
Step.1: dir *.java /s /b > FilesList.txt
Step.2: javac @FilesList.txt -d compiledCode -cp D:\COMPILE\lib\*.jar
After run the Step.2 command its showing Error.so I removed the error jar file from my lib folder & run the command but its showing same error with another jar.
Note: I Already have ANT build.xml but I want to compile the project through COMMAND PROMPT.
The lib*.jar
gets expanded by the command shell. You need to avoid that by using quotes.
***** -cp "D:\COMPILE\lib\*" *****
The argument to -cp
is a single path list (like $PATH
, not multiple arguments with one path each). Multiple files can be separated by :
(or ;
on Windows)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With