Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How do i set or include tomcat lib in my fedora 13 classpath?

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys,
i am having problems getting my fedora 13 system to recognise my apache tomcat lib which contains lots of jar files needed to compile servlets and jsp based java programs,but if i specify the jar file with -cp on the command line it compiles; i have a total of 33 jar files in the lib folder and it will be cumbersome having to specify every individual jar file on the command line every time i want to compile a java file.; i have set the classpath env variable : ## export CLASSPATH
export CLASSPATH="/usr/local/apache-tomcat-6.0.16/lib"
in etc/profile and ~./bash_profile file but still i get package javax.servlet.jsp does not exist. On windows i dont seem to have this problem after setting the classpath. I also have these included in etc/profile and ~./bash_profile:
## export JAVA_HOME
export JAVA_HOME="/usr/java/jdk1.6.0_21"

## export CATALINA_HOME
export CATALINA_HOME="/usr/local/apache-tomcat-6.0.16"

i'll be glad if you guys can give me a helping hand.
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
See if these help:

http://faq.javaranch.com/java/CompilingServlets
http://faq.javaranch.com/java/HowToSetTheClasspath

 
Saloon Keeper
Posts: 27933
198
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

yomi Balogun wrote: it will be cumbersome having to specify every individual jar file on the command line every time i want to compile a java file



... Which is why most of use use Maven or Ant to build complex projects these days. Which pretty much includes every web application.

There's nothing about Fedora that makes it any different when it comes to classpaths, BTW. Although you do want to make sure none of the gcj stuff gets pulled in by accident. gcj isn't complete enough for Enterprise Java apps.
 
Where all the women are strong, all the men are good looking and all the tiny ads are above average:
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic