Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java_home not set

 
mudassir shahab
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ./startup.sh it prompts "The JAVA_HOME environment variable is not defined"
plz help this out..............................thanking u
 
Adrian Yan
Ranch Hand
Posts: 688
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Linux is case-sensitive, so you need to rename your java_home, etc to upper case.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17989
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 jakarta.apache.org).
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.
 
Adrian Yan
Ranch Hand
Posts: 688
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
/var/tomcat follws the convention in apache. If you install apache in most system is in /var/apache, same for mysql, etc.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic