"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. |
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.
|
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! |
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?
|
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). |
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. |
in that case please describe exactly what have you entered.
|
Quote:
Otherwise identical, didn't work before or after change to jdk. |
Quote:
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. |
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
|
Quote:
As for setting JAVA_HOME = jdk path, I mentioned above twice that I have already tried this. |
Quote:
The issue lies elsewhere. |
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
|
Quote:
|
bash -xv <script>
will create a log and you can check the program flow or post the result |
I can quote the whole of the shell script for install here:
#!/bin/bash EDITION=community RETVAL=0 NOASK="false" DEBUG_LOGS="true" NOLICENSE="false" NODE=0 DATABASE_SERVER_NAME="localhost" DATABASE_PORT="7403" REMOTE_DATA_BASE=local INSTALL_FOLDER="" ERROR_OK=0 SILENT_NODE=0 IP="" REDHAT_VERSION=64 VERSION=7.4 MINOR_VERSION=1 REVO_VERSION=7.4.1 REVO_BIN_STRING=Revo-$VERSION R_VERSION=R-3.1.2 LINUX_VERSION=5 TOMCAT_VERSION=7.0.34 TOMCAT_SSL_PORT=7401 TOMCAT_PORT=7400 TOMCAT_SHUTDOWN_PORT=7402 RSERVE_PORT=7404 RSERVE_CANCEL_PORT=7405 USER='wnhoami' GROUP='id -g -n $USER' IS_ROOT=0 R=1 RBIN="/usr/bin/R" R_HOME=/usr/lib64/R LINUX=redhat DB_PATH="" ##HOST_NAME=`/sbin/ifconfig | grep --max-count=1 -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'` ##HOST_NAME=`/sbin/ifconfig | grep --max-count=1 -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'` HOST_NAME=localhost checkRoot() { uid=`id -u` if [ 0 -eq $uid ] ; then IS_ROOT=1 A couple things jump out @ me: This should be installed as root, I know that's bad practice in some senses, but mb "USER="whoami"" and IS_ROOT=0 are problems. The version of R is also wrong. Also - the fact that it shebangs from /bin/bash...should that be a directory that is either root or related to the Java directory or where my bashrc and profile files are? |
Quote:
checkPrerequisites analyzeJava '[' -z '' ']' javaMessage ' ' echo ---------- Post added 09-23-15 at 03:56 AM ---------- Quote:
|
Usually things are installed as root, there is nothing wrong with that. You need to check the documentation if that software should (or should not) be installed as root.
shebang is ok, it is not related to java at all and the location of the files you mentioned. But it is not the whole script, just the beginning. I have no idea what is that R |
Quote:
|
3 Attachment(s)
There's a lot of stuff here. I'm going to post everything Java related in the install script in .jpeg files...don't sweat a quick response on this one. I appreciate the help.
(edit: I guess it's only 3 jpeg's) Attachment 19659 Attachment 19660 Attachment 19661 |
Quote:
|
Actually I would prefer the log file (bash -xv <Script>) those pictures do not help.
|
Quote:
|
Quote:
|
I don't know how to make that command give me a log file, or where that log file would be.
|
AWS support just got back to me - they were able to install it without any trouble and gave me all the input and output they used. So Ill try that, let you know if it works, and be back tmrw.
|
All times are GMT -5. The time now is 01:46 AM. |