So many thanks for the detailed explanation. I use eclipse 3.6 but not the one shipped with fedora 13
Regards On Thu, 2010-11-18 at 12:08 -0800, Mark Eggers wrote: > >From this and other messages, it looks like you're running everything > >installed > from the Fedora distribution. > > While I run Fedora (just upgraded to Fedora 14), I don't use any of the > distribution-supplied packages for Java, Tomcat, or the IDE (my preference > being > NetBeans). > > To get the Oracle / Sun Java installed, just download the appropriate files > from > Oracle. If you use the RPM packages, you can then use the alternatives > program > to switch between the various implementations. > > A detailed discussion on Fedora's Java implementation can be found here: > > http://fedoraproject.org/wiki/Java > > Then you will need to either inject Oracle's Java into the path before the > Fedora-supplied Java or use the alternatives program to configure and switch > between Java packages. The latter is more in line with the OS, while the > former > is what I currently do. > > Here's one link on how to use the alternatives program: > > http://www.if-not-true-then-false.com/2010/install-sun-oracle-java-jdk-jre-6-on-fedora-centos-red-hat-rhel/ > > > I took a brief look at the Fedora-supplied Tomcat. As with many other > distributions, the software is split across multiple packages, and contains > extraneous material. > > If you're doing development, it's far easier to download a copy of Tomcat > from > tomcat.apache.org, unpack it somewhere handy, and then run it. I maintain > multiple copies of Tomcat in ~/Apache along with various modifications to run > Solr, Jetspeed, OpenPortal, Pluto, some virtual hosts, and some clusters. No, > I > don't run all of these at once. > > Your other problem is when you start using log4j in your application and want > to > build the war file. Normally when you add a server to NetBeans or (I presume) > Eclipse, the IDE will use the server-supplied jar files to resolve > references. > The IDE will base which jars to pull from the server based on the type of > server > you've defined for a particular project. > > The problem is that Tomcat (as others have pointed out) does not come with > log4j > by default. If Eclipse is using the default definition of Tomcat, then a > log4j > jar file will not be included in the build path since the default > installation > does not have it. > > If you are set on running your application with Fedora's Tomcat distribution, > then you will have to include log4j in your Eclipse project, but have it not > added to the war file. If you are using a stock version of Tomcat, then you > will > have to add log4j to your project for both compilation and creation of the > war. > > Since I don't normally use Eclipse, I have no real idea how to do this. > > My personal preferences are: > > 1. Install Java JRE/SDK/Docs from Oracle > Either alter the path or use alternatives to manage multiple Java versions > 2. Install Tomcat from ASF into my home directory for development > 3. Install IDE of choice from that vendor. > > This makes getting help from the various mailing lists (Java, IDE, Tomcat) > much > easier. > > The only downside is that you will have to manage updates for these > components > manually. However, at least Java can be managed via yum (just download the > RPM > packages from Oracle). > > . . . . just my two cents > > /mde/ > > ----- Original Message ---- > From: Salam Y. ELIAS <salamli...@free.fr> > To: users@tomcat.apache.org > Sent: Thu, November 18, 2010 1:46:54 AM > Subject: how to setup HOME_PATH for Java and CATALINA_HOME > > I need to set up the environment variable JAVA_HOME and and > CATALINA_HOME to start some web and Java EE, am little bit confused > with conflicting information. > When I run > java -version > ie get > java version "1.6.0_18" > OpenJDK Runtime Environment (IcedTea6 1.8.2) > (fedora-43.1.8.2.fc13-x86_64) > OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode) > > When I run "which java" > > I get > "/usr/bin/java[/QUOTE]" > > checking my usr/share I see several directories > java (full of files and directories) > java-1.3.0 (1 jar in it) > java-1.3.1 (empty) > java-1.4.0 (empty) > java-1.5.0 (empty) > java-1.6.0 (empty) > java-1.7.0 (empty) > > Issuing the "echo %PATH gives the following" > > > /usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/salam/bin > > > > In eclipse helios 3.6, I see in preferences > Java I have > > /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64 > > > How one can check that he has Java EE setup correctly with Apache Tomcat > 6 ? > > I have Apache Tomcat up and running and need to setup CATALINA_HOME. > In the usr/share/java directory, I have a directory "tomcat6" as well as > a tomcat6 directory in /usr/share/. In Eclipse, when I try to add a > server, eclipse doesnt see that I have a type of tomcat server. > > I have found so many articles on the web but no 2 articles are similar. > I tried to browse Sun's "Path setup tutorial" but it seems it is not > available anymore. > > Thanks for your help > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org