• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 360
  • 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

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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