AO Logo
 
  
  
  
Profile
Upgrading Tomcat
JDBC Pool
JDBC Transactions
Restart JVM
Control JVM
Shell Compiling
JVM Logs
AO
AO Industries, Inc.
Application Infrastructure ProviderApplication Infrastructure Provider
Sign UpWhat's NewClient AreaContact UsSite Map
 
your location:   home page ··· client area ··· faqs ··· java virtual machines ··· compiling from a shell
Compiling From a Shell
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.