LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 05-30-2018, 05:46 AM   #1
asliyanage1984
LQ Newbie
 
Registered: Oct 2017
Posts: 10

Rep: Reputation: Disabled
echo $JAVA_HOME whows which files java


when i run "echo $JAVA_HOME" in redhat linux machine is whows some java location. I need to know where is the JAVA_HOME setting saved.How can i find where is the exact location of settings?
 
Old 05-30-2018, 07:51 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Originally Posted by asliyanage1984 View Post
when i run "echo $JAVA_HOME" in redhat linux machine is whows some java location. I need to know where is the JAVA_HOME setting saved.How can i find where is the exact location of settings?
Look in the files under /etc/profile.d/ if it's set globally, or in .profile .bashrc or .bash_profile in the user's home directory if it's set per user.
 
Old 05-30-2018, 11:03 PM   #3
asliyanage1984
LQ Newbie
 
Registered: Oct 2017
Posts: 10

Original Poster
Rep: Reputation: Disabled
there are lot of file under /etc/profile.d/ . which one to look for these details?
 
Old 05-31-2018, 12:35 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Originally Posted by asliyanage1984 View Post
there are lot of file under /etc/profile.d/ . which one to look for these details?
You should use grep recursively.
Take a look at this to see what you need to do.

Regards
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
java -version and java_home dazzpowder General 3 04-11-2018 10:38 AM
[SOLVED] Java install: JAVA_HOME seems to be missing deretsigernu Slackware 15 09-28-2017 05:48 PM
echo $JAVA_HOME srinivasmmdl Linux - Newbie 1 02-01-2012 05:00 AM
How to get/set Java version, JAVA_HOME and Classpath MughalShahzad Programming 3 07-13-2010 10:26 PM
Java - JAVA_HOME problem after upgrade ssa2204 Linux - Newbie 5 08-24-2006 06:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 01:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration