| | | | | | | | | | | | | | Article Summary
Title: | | Compiling From a Shell | Description: | CLASSPATH changes necessary to compile from a shell | Key Words: | classpath, compiling, javac, shell, compile | Type: | FAQs | Category: | Java Virtual Machines | Last Updated: | 2003-01-17 09:58:02 |
| | | | |
| | | | Compiling From a Shell
When I try to compile my .java files contained in the /www/site_name/webapps/ROOT/WEB-INF/classes/ directory, I get errors saying that some classes cannot be found. How do I change my CLASSPATH so that I may compile from the shell?
Add the following lines at the end of your ~/.bashrc script:
JVM=`dirname \`dirname \\\`which tomcat\\\`\``
for JAR in `find $JVM/bin $JVM/lib $JVM/common/lib $JVM/server/lib | grep .jar$`
do
export CLASSPATH=${CLASSPATH}:$JAR
done
export CLASSPATH=${CLASSPATH}:/www/site_name/webapps/ROOT/WEB-INF/classes
| | | | |
| | | | | Copyright © 2000-2024 AO Industries, Inc. |
|