Solved

JAVA_HOME env var

Posted on 2014-03-14
3
343 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
ID: 39930850
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
ID: 39933209
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
ID: 39933271
Try add this to the .bash_profile

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

Open in new window

0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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.

776 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