My java files are in the C:\TOMCATHOME\webapps\MyApp\WEB-INF\src\java\org\apache\example folder Those java files import lots of JARs in the C:\TOMCATHOME\webapps\MyApp\WEB-INF\lib folder. When I try to compile my java files, 1. set the classpath: C:\>set CLASSPATH=C:\TOMCATHOME\webapps\MyApp\WEB-INF\src\java;%CLASSPATH% 2. change to the directory where my java files are: C:\>cd C:\TOMCATHOME\webapps\MyApp\WEB-INF\src\java\org\apache\example 3. compile my java files But, the compiler does not know all the required JARs are in the C:\TOMCATHOME\webapps\MyApp\WEB-INF\lib folder. How do I put the JARs in the classpath? I have tried to compile in different ways but did not succeed.
Note... do NOT put a trailing semicolon after the last entry and this is all on one line (without spaces or hard returns) This is why most people use either an IDE, or ANT
JiaPei Jen
Ranch Hand
Joined: Nov 19, 2000
Posts: 1309
posted
0
Thanks, Mike. It is exactly what I need to know. I want to work out an application without the assistance of the ANT or any IDE at least once.
subject: How To Compile If I Have To Set Two Classpath?