LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-22-2015, 03:42 PM   #1
brownratpig
LQ Newbie
 
Registered: Sep 2015
Posts: 18

Rep: Reputation: Disabled
"Please set JAVA_HOME" (but I'm sure I did)


Installing Deployr on RHEL 7:
http://deployr.revolutionanalytics.c...admin/install/
Installed Java from Josee's link @ bottom: https://groups.google.com/forum/#!se...g/_jzuuKXuDAAJ, jre1.8.0_60
set JAVA_HOME to export JAVA_HOME=/usr/java/jre1.8.0_60
$JAVA_HOME/bin/java -version returns output of:
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
added @ end of /etc/profile:
export JAVA_HOME=/usr/java/jre1.8.0_60
export PATH="$JAVA_HOME/bin:$PATH"
source /etc/profile
hard reboot OS
Still get "Please set JAVA_HOME" on start of Deployr install.
????? AWS and MSFT support recommend exactly what I did...

Thanks for any advice.
 
Old 09-22-2015, 08:53 PM   #2
theAdmiral
Member
 
Registered: Oct 2008
Location: Boise, Idaho
Distribution: Debian GNU/Linux (Jessie) + KDE
Posts: 168

Rep: Reputation: 4
Is this an initial Java installation? Have you tried running, say, a Java "Hello, World!" program from the command line, for example with you in your /home/ directory? Although I doubt it, you could be dealing with a bug. But, this test may help you rule something out---whether you are sure that you are sure that the environment variable is set.
 
Old 09-22-2015, 09:32 PM   #3
brownratpig
LQ Newbie
 
Registered: Sep 2015
Posts: 18

Original Poster
Rep: Reputation: Disabled
Yes an initial install. And I only did JRE, not JDK or server JRE, as recommended by MSFT for this install. How do I run that Hello World program...sounds like a great idea?

Thanks for the reply!
 
Old 09-23-2015, 01:55 AM   #4
brownratpig
LQ Newbie
 
Registered: Sep 2015
Posts: 18

Original Poster
Rep: Reputation: Disabled
It occurred to me: the deployr install docs say only to download jre, and not the jdk. Does that make any sense? Don't I have to have JDK too? And JAVA_HOME pertains to JDK, and JRE_HOME pertains to JRE? Can I install JDK after JRE without screwing anything up? Or do I install them both at once and delete the old one first?
 
Old 09-23-2015, 02:31 AM   #5
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,078

Rep: Reputation: 7364Reputation: 7364Reputation: 7364Reputation: 7364Reputation: 7364Reputation: 7364Reputation: 7364Reputation: 7364Reputation: 7364Reputation: 7364Reputation: 7364
JRE stands java runtime environment, is used to run java programs. JDK stands for java development environment and is used to create java programs. Obviously JKD contains JRE too.
You can install JDK next to JRE, that should not be a problem. If you have not installed JDK, you cannot set JAVA_HOME to JDK (that simply make no sense), instead, you need yo set it to JRE (or install JDK too).
 
Old 09-23-2015, 02:54 AM   #6
brownratpig
LQ Newbie
 
Registered: Sep 2015
Posts: 18

Original Poster
Rep: Reputation: Disabled
Yes - unfortunately, I had JAVA_HOME to jre (when there was no jdk). Installed JDK and set it instead to jdk, still didn't work. Very annoying, $JAVA_HOME/bin/java -version returns output of:
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)

But I still get "Please set JAVA_HOME" error on trying to install my software.

Last edited by brownratpig; 09-23-2015 at 02:58 AM.
 
Old 09-23-2015, 03:04 AM   #7
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,078

Rep: Reputation: 7364Reputation: 7364Reputation: 7364Reputation: 7364Reputation: 7364Reputation: 7364Reputation: 7364Reputation: 7364Reputation: 7364Reputation: 7364Reputation: 7364
in that case please describe exactly what have you entered.
 
Old 09-23-2015, 03:11 AM   #8
brownratpig
LQ Newbie
 
Registered: Sep 2015
Posts: 18

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
in that case please describe exactly what have you entered.
It's in my first post, except now it's jdk where it was once jre.
Otherwise identical, didn't work before or after change to jdk.
 
Old 09-23-2015, 03:12 AM   #9
brownratpig
LQ Newbie
 
Registered: Sep 2015
Posts: 18

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by brownratpig View Post
Installing Deployr on RHEL 7:
http://deployr.revolutionanalytics.c...admin/install/
Installed Java from Josee's link @ bottom: https://groups.google.com/forum/#!se...g/_jzuuKXuDAAJ, jre1.8.0_60
set JAVA_HOME to export JAVA_HOME=/usr/java/jre1.8.0_60
$JAVA_HOME/bin/java -version returns output of:
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
added @ end of /etc/profile:
export JAVA_HOME=/usr/java/jre1.8.0_60
export PATH="$JAVA_HOME/bin:$PATH"
source /etc/profile
hard reboot OS
Still get "Please set JAVA_HOME" on start of Deployr install.
????? AWS and MSFT support recommend exactly what I did...

Thanks for any advice.


Maybe need to put $PATH @ start of PATH? (instead of at end)
I went ahead and tried to add export JAVA_HOME=/usr/java/jdk1.8.0_60 and export PATH to bashrc as well...no difference.
 
Old 09-23-2015, 03:23 AM   #10
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,078

Rep: Reputation: 7364Reputation: 7364Reputation: 7364Reputation: 7364Reputation: 7364Reputation: 7364Reputation: 7364Reputation: 7364Reputation: 7364Reputation: 7364Reputation: 7364
probably it needs JDK, JRE is not enough. In that case you need to set JAVA_HOME to JDK, and check $JAVA_HOME/bin/javac
 
Old 09-23-2015, 03:28 AM   #11
brownratpig
LQ Newbie
 
Registered: Sep 2015
Posts: 18

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
probably it needs JDK, JRE is not enough. In that case you need to set JAVA_HOME to JDK, and check $JAVA_HOME/bin/javac
$JAVA_HOME/bin/javac returns a guide for usage on javac

As for setting JAVA_HOME = jdk path, I mentioned above twice that I have already tried this.
 
Old 09-23-2015, 03:31 AM   #12
brownratpig
LQ Newbie
 
Registered: Sep 2015
Posts: 18

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by brownratpig View Post
$JAVA_HOME/bin/javac returns a guide for usage on javac

As for setting JAVA_HOME = jdk path, I mentioned above twice that I have already tried this.
If you mean $JAVA_HOME/bin/java -version, I have shown the output multiple times above, it shows as though it is set correctly.
The issue lies elsewhere.
 
Old 09-23-2015, 03:33 AM   #13
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,078

Rep: Reputation: 7364Reputation: 7364Reputation: 7364Reputation: 7364Reputation: 7364Reputation: 7364Reputation: 7364Reputation: 7364Reputation: 7364Reputation: 7364Reputation: 7364
you need to read the documentation of Deployr, probably incorrect version or ??? - or - if the installer was a readable shell script you can check what's happened

Last edited by pan64; 09-23-2015 at 03:35 AM.
 
Old 09-23-2015, 03:39 AM   #14
brownratpig
LQ Newbie
 
Registered: Sep 2015
Posts: 18

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
you need to read the documentation of Deployr, probably incorrect version or ??? - or - if the installer was a readable shell script you can check what's happened
Deployr support told me to set it the way I have thus far, then threw up their hands and effectively said, "we don't know." However, the installer is a readable shell script. But won't I be seeing the script before it runs, rather than the error broken down after the fact?
 
Old 09-23-2015, 03:45 AM   #15
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,078

Rep: Reputation: 7364Reputation: 7364Reputation: 7364Reputation: 7364Reputation: 7364Reputation: 7364Reputation: 7364Reputation: 7364Reputation: 7364Reputation: 7364Reputation: 7364
bash -xv <script>
will create a log and you can check the program flow or post the result
 
  


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
[SOLVED] Error:: "wrong # args: should be "set varName ?newValue?" " while running TCL script rc49 Linux - Newbie 2 09-15-2016 12:01 AM
"Error: JAVA_HOME is not defined correctly"while building PMS moisespedro Slackware 10 01-01-2014 06:52 PM
why "su" and "sudo" commands need to be Set-UID programs?? goldengriff Ubuntu 3 11-07-2013 03:52 AM
How to set the font-size for "xterm" terminal-emulator (running "bash" shell) ajaygarg Linux - Desktop 1 03-09-2012 12:38 PM
How to set the size of icons for "Starterbar" in "Gdekslets" Blue Jacket Linux - Software 4 11-23-2005 02:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:19 PM.

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