• 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
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

set JAVA_HOME

 
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there,
on a Suse 10.1 I'm trying to run JBoss 4 which at the startup gives me the following message

run.sh: Missing file: /lib/tools.jar
run.sh: Unexpected results may occur. Make sure JAVA_HOME points to a JDK and not a JRE.


ok, then I checked where actually the jdk was
/opt/jdk1.5.0_07

from the console
echo $JAVA_HOME
/usr/lib/jvm/java


so, I tried to set the JAVA_HOME
export JAVA_HOME=/opt/jdk1.5.0_07
export PATH=$JAVA_HOME/bin:$PATH


just a quick check
which java
/opt/jdk1.5.0_07/bin/java
which javac
/opt/jdk1.5.0_07/bin/javac


fine.....I though
but as soon as log out and log in all the java enviroments back as were before.
What's going on? How can I solve my problem?
(how can I set that var for every user?)

Thanks in advance
 
author and iconoclast
Posts: 24204
44
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You have to edit the appropriate configuration files -- just setting the variables at the prompt affects your current session only.

I'm going to move this to our Linux/UNIX forum, where someone with a little more time than me will explain the details to you. In the meantime, you could try running "info bash" and reading the section on configuration files.
 
reply
    Bookmark Topic Watch Topic
  • New Topic