LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-18-2010, 04:12 AM   #1
eliassal
Member
 
Registered: Jan 2008
Posts: 103

Rep: Reputation: 0
how to setup HOME_PATH for Java and CATALINA_HOME


I need to set up the environment variable JAVA_HOME and am little bit confused with conflicting information.
When I run
java -version
ie get
Quote:
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
Code:
which java
I get
Quote:
/usr/bin/java
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"

Quote:
/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

Quote:
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64
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/.

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

Last edited by eliassal; 11-18-2010 at 04:46 AM.
 
Old 11-18-2010, 05:53 AM   #2
quanta
Member
 
Registered: Aug 2007
Location: Vietnam
Distribution: RedHat based, Debian based, Slackware, Gentoo
Posts: 724

Rep: Reputation: 101Reputation: 101
You have some options:
1. export CATALINA_HOME=...
2. put it into /etc/profile
3. put it into ~/.bash_profile
 
Old 11-18-2010, 12:44 PM   #3
eliassal
Member
 
Registered: Jan 2008
Posts: 103

Original Poster
Rep: Reputation: 0
OK

Thanks I did it. Still 1 small issue, I managed to make Apache Tomcat work and created a dynamic web project.

However, the inside the ide is flagged with a red exclamation mark.
Checked the problems pane, it seems it is related to log4j jar file, I
found

Quote:
Description Resource Path Location Type
The container 'Apache Tomcat v6.0 [Apache Tomcat v6.0]' references non
existing library /usr/share/tomcat6/lib/log4j-6.0.26.jar TestTomcat
Build path Build Path Problem

I checked my tomcat directrory, I have "log4j.jar" and a link file
"log4j-6.0.26.jar".

What I noticed is that this link file is flagged with a lock image on
the file icon besides it.

All other jars are there well seen in the build bath except this one
flagged with red
What is needed to be done ?

when I issue
ls -l /usr/share/tomcat6/lib/

I get

Quote:
-rw-r--r-- 1 root root 15232 Oct 12 22:43 annotations-api-6.0.26.jar
lrwxrwxrwx 1 root root 26 Nov 16 19:41 annotations-api.jar -> annotations-api-6.0.26.jar
-rw-r--r-- 1 root root 1182597 Oct 12 22:43 catalina-6.0.26.jar
-rw-r--r-- 1 root root 53695 Oct 12 22:43 catalina-ant-6.0.26.jar
lrwxrwxrwx 1 root root 23 Nov 16 19:41 catalina-ant.jar -> catalina-ant-6.0.26.jar
-rw-r--r-- 1 root root 128233 Oct 12 22:43 catalina-ha-6.0.26.jar
lrwxrwxrwx 1 root root 22 Nov 16 19:41 catalina-ha.jar -> catalina-ha-6.0.26.jar
lrwxrwxrwx 1 root root 19 Nov 16 19:41 catalina.jar -> catalina-6.0.26.jar
-rw-r--r-- 1 root root 234698 Oct 12 22:43 catalina-tribes-6.0.26.jar
lrwxrwxrwx 1 root root 26 Nov 16 19:41 catalina-tribes.jar -> catalina-tribes-6.0.26.jar
-rw-r--r-- 1 root root 569454 Oct 12 22:43 jakarta-commons-collections.jar
lrwxrwxrwx 1 root root 40 Nov 16 19:41 jakarta-commons-dbcp.jar -> /usr/share/java/jakarta-commons-dbcp.jar
lrwxrwxrwx 1 root root 40 Nov 16 19:41 jakarta-commons-pool.jar -> /usr/share/java/jakarta-commons-pool.jar
-rw-r--r-- 1 root root 542469 Oct 12 22:43 jasper-6.0.26.jar
-rw-r--r-- 1 root root 108450 Oct 12 22:43 jasper-el-6.0.26.jar
lrwxrwxrwx 1 root root 20 Nov 16 19:41 jasper-el.jar -> jasper-el-6.0.26.jar
lrwxrwxrwx 1 root root 17 Nov 16 19:41 jasper.jar -> jasper-6.0.26.jar
lrwxrwxrwx 1 root root 23 Nov 16 19:41 jasper-jdt.jar -> /usr/share/java/ecj.jar
lrwxrwxrwx 1 root tomcat 5 Nov 16 19:42 log4j-6.0.26.jar -> log4j
-rw-r--r-- 1 root tomcat 378088 Oct 12 22:43 log4j.jar
lrwxrwxrwx 1 root root 32 Nov 16 19:41 tomcat6-el-2.1-api-6.0.26.jar -> ../tomcat6-el-2.1-api-6.0.26.jar
lrwxrwxrwx 1 root root 33 Nov 16 19:41 tomcat6-jsp-2.1-api-6.0.26.jar -> ../tomcat6-jsp-2.1-api-6.0.26.jar
lrwxrwxrwx 1 root root 37 Nov 16 19:41 tomcat6-servlet-2.5-api-6.0.26.jar -> ../tomcat6-servlet-2.5-api-6.0.26.jar
-rw-r--r-- 1 root root 757790 Oct 12 22:43 tomcat-coyote-6.0.26.jar
lrwxrwxrwx 1 root root 24 Nov 16 19:41 tomcat-coyote.jar -> tomcat-coyote-6.0.26.jar
-rw-r--r-- 1 root root 69874 Oct 12 22:43 tomcat-i18n-es-6.0.26.jar
lrwxrwxrwx 1 root root 25 Nov 16 19:41 tomcat-i18n-es.jar -> tomcat-i18n-es-6.0.26.jar
-rw-r--r-- 1 root root 51809 Oct 12 22:43 tomcat-i18n-fr-6.0.26.jar
lrwxrwxrwx 1 root root 25 Nov 16 19:41 tomcat-i18n-fr.jar -> tomcat-i18n-fr-6.0.26.jar
-rw-r--r-- 1 root root 54489 Oct 12 22:43 tomcat-i18n-ja-6.0.26.jar
lrwxrwxrwx 1 root root 25 Nov 16 19:41 tomcat-i18n-ja.jar -> tomcat-i18n-ja-6.0.26.jar
lrwxrwxrwx 1 root root 35 Nov 16 19:41 tomcat-juli* -> /usr/share/tomcat6
Thanks for your help
 
Old 11-18-2010, 01:43 PM   #4
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Quote:
lrwxrwxrwx 1 root tomcat 5 Nov 16 19:42 log4j-6.0.26.jar -> log4j
-rw-r--r-- 1 root tomcat 378088 Oct 12 22:43 log4j.jar
Looks like the symlink log4j-6.0.26.jar is pointing to a file called log4j instead of the file called log4j.jar
 
Old 11-18-2010, 03:23 PM   #5
eliassal
Member
 
Registered: Jan 2008
Posts: 103

Original Poster
Rep: Reputation: 0
Wink Thanks

I cahnged the target for the link and it worked.
I still need a lot to learn about linux
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Java compiler, need setup? wakeboarder3780 Slackware 17 12-05-2006 07:26 PM
setup java environment sunhui Linux - Software 4 11-22-2006 04:57 AM
Kdevelop Java Setup jeffxor Programming 0 07-31-2004 11:43 AM
Java VM Setup Crickit Linux - Software 3 01-08-2004 09:41 PM
setup java using suse j-ray Programming 2 02-07-2002 04:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration