Dear All
I am a 50-year old chartered accountant doing
J2EE Web Programming course in India. I am, of course, a novice in
servlet programming. I attempted to compile a TestServlet.java. I am using bash terminal in my MacBookAir. It compiled when I used the command, "javac -classpath /Library/Tomcat/lib/servlet-api.jar TestServlet.java".
1) "/Library/Tomcat" folder in my MacBookAir refers, through a link set up through bash terminal at the time of installing
Tomcat,
to "/usr/local/apache-tomcat-7.0.39".
2) My .bash_profile in my "Users/sankar" folder in my MacBookAir, already,-
a) has set $CATALINA_HOME through its export statement to the above "/usr/local/apache-tomcat-7.0.39" and
b) has its CLASSPATH including "/$CATALINA_HOME/lib/servlet-api.jar".
3) My "/CATALINA_HOME/lib" folder in my MacBookAir, also actually includes the servlet-api.jar file.
The related screenshot files evidencing the above settings, I have attached to this query.
Why then does my javac command NOT compile my TestServlet.java without the -classpath attribute added to it ?
What should I do now, to just compile TestServlet.java using simple javac command ?
Kindly resolve my query, if time permits, soon.
Thanks in advance for your upcoming support
Regards
Ra K Sankar