Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 365
  • Last Modified:

JAVA_HOME env var

I have an application that requires a JAVA_HOME directory to be set

I performed a 'set', and did not see one:


...
HOSTTYPE=x86_64
ID=0
IFS=$' \t\n'
LANG=en_US.UTF-8
...

Open in new window


Below describes the java location and availability

# which java
/usr/bin/java
# java -version
java version "1.7.0_09-icedtea"
OpenJDK Runtime Environment (rhel-2.3.7.1.el6_3-i386)
OpenJDK Server VM (build 23.7-b01, mixed mode)

Open in new window


How can I set the JAVA_HOME env var correctly, could someone please post the command or tell me what file to include the command in to get the command working upon boot up
0
Anthony Lucia
Asked:
Anthony Lucia
  • 2
1 Solution
 
MazdajaiCommented:
Try adding this to your bash profile

JRE_HOME=/usr/java/default; export JRE_HOME

Open in new window

0
 
Anthony LuciaAuthor Commented:
My software requires a JAVA_HOME env var, as opposed to a HRE_HOME

Could someone please tell me how to perform this
0
 
MazdajaiCommented:
Try add this to the .bash_profile

export PATH=$PATH:/usr/bin/java

Open in new window

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now