Solved

JAVA_HOME env var

Posted on 2014-03-14
3
337 Views
Last Modified: 2014-03-17
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
Comment
Question by:Anthony Lucia
  • 2
3 Comments
 
LVL 21

Expert Comment

by:Mazdajai
Comment Utility
Try adding this to your bash profile

JRE_HOME=/usr/java/default; export JRE_HOME

Open in new window

0
 

Author Comment

by:Anthony Lucia
Comment Utility
My software requires a JAVA_HOME env var, as opposed to a HRE_HOME

Could someone please tell me how to perform this
0
 
LVL 21

Accepted Solution

by:
Mazdajai earned 500 total points
Comment Utility
Try add this to the .bash_profile

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

Open in new window

0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now