Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

JAVA_HOME env var

Posted on 2014-03-14
3
Medium Priority
?
356 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 total points
ID: 39933271
Try add this to the .bash_profile

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

Open in new window

0

Featured Post

The Orion Papers

Are you interested in becoming an AWS Certified Solutions Architect?

Discover a new interactive way of training for the exam.

Question has a verified solution.

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

FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

715 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