Meaningless Drivel is fun!
The moose likes Linux / UNIX and the fly likes java_home not  set Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "java_home not  set" Watch "java_home not  set" New topic

java_home not set

mudassir shahab
Ranch Hand

Joined: Oct 13, 2003
Posts: 54
hi dudes...
i am using redhat 8. i have copied jdk1.4 and tomcat4.0 from my windows(fat 32) partition and paste them in my linux partition ...under the folder name /root/opt...then i turned into the /root/opt/tomcat4/bin folder and wrote the commands while standing on the command prompt
export java_home=/root/opt/jdk1.4
export tomcat_home=/root/opt/tomcat4.0
uptill now no errors
but when i wrote ./ it prompts "The JAVA_HOME environment variable is not defined"
plz help this out..............................thanking u
Adrian Yan
Ranch Hand

Joined: Oct 02, 2000
Posts: 688
Linux is case-sensitive, so you need to rename your java_home, etc to upper case.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17410

Also, exports are not "sticky". If you close that command window, log off - or even open open a new command window/virtual terminal, the exports for JAVA_HOME, TOMCAT_HOME, and CATALINA_HOME will be unavailable to the other command environments.
I don't recommend simply copying Tomcat from Windows. It may work, but there are packagings targeted specifically to Linux.
Better yet, if you get the RPM package for Tomcat, you'll get a tailored install that makes starting Tomcat as easy as "/sbin/service tomcat4 start" at a root user command prompt. And you can customize the run parameters by editing the files in /etc/tomcat4.
Run back a couple of messages in this forum and you'lll see that some kind person has provided a URL to get Tomcat in RPM form (it's not available at
BTW, the RPM for Tomcat4 - or at least the last one I installed placed Tomcat in /var/tomcat4. Why that location was chosen, I don't know, but it works.

An IDE is no substitute for an Intelligent Developer.
Adrian Yan
Ranch Hand

Joined: Oct 02, 2000
Posts: 688
/var/tomcat follws the convention in apache. If you install apache in most system is in /var/apache, same for mysql, etc.
I agree. Here's the link:
subject: java_home not set
It's not a secret anymore!