How to change to different Java version?

aad34210
Level 3
How to change to different Java version?

Hi, all.



I'm trying to change Java version for using H2O package via R recipe but it doesn't works fine.  I faced below message when I use H2O package via R recipe.



Job failed: Error in R process: simpleError : Your java is not supported: java version "1.7.0_231" Please download the latest Java SE JDK 8 from the following URL: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html



So, I have already update latest Java version on my EC2 machine and changed env-site.sh in below link accordingly.



$ java -version

openjdk version "1.8.0_222"

OpenJDK Runtime Environment (build 1.8.0_222-b10)

OpenJDK 64-Bit Server VM (build 25.222-b10, mixed mode)




I edited DATA_DIR/bin/env-site.sh file.

https://doc.dataiku.com/dss/latest/installation/java_env.html#switching-the-jvm



But this change not correct working and show below messages when I enter "DATA_DIR/bin/dss start" command.



/home/******/DATA_DIR/bin/env-site.sh: line 3: export: `dataiku-dss-VERSION/installer.sh': not a valid identifier

/home/******/DATA_DIR/bin/env-site.sh: line 3: export: `-d': not a valid identifier

/home/******/DATA_DIR/bin/env-site.sh: line 3: export: `-u': not a valid identifier




Could you tell me how to fix this issue?



Best regards.

Thank you.



 

0 Kudos
2 Replies
Omar
Dataiker

Hi, 



what is the exact procedure you followed ? 

If you run the installer in the upgrade mode as per the guide you linked, you don't need to edit the env-site.sh file.



Can you please remove the edit you made to the env-site.sh file and make sure that this command:

DKUJAVABIN=/PATH/TO/NEW/java dataiku-dss-VERSION/installer.sh -d DSS_DATADIR -u

Is pointing to the java folder and not to the java executable? 



For example, if your java executable is in /usr/java/java-1.8.0_222/bin/java, then the path you need will be /usr/java/java-1.8.0_222



 



Best,



O.

0 Kudos
aad34210
Level 3
Author
Thank you for your answer and I'm sorry too late to reply it.

I misunderstood how to use DKUJAVABIN command. I remove it from env-site.sh and ran it on bash directly .
Also I set properly Java PATH and command options like below. It was works fine and DSS wake up successfully.
====
DKUJAVABIN=/home/ec2-user/jdk1.8.0_231/bin/java dataiku-dss-5.0.3/installer.sh -u -d DATA_DIR -y
====

But after above modification, R recipe which using H2O package showed different warnings again.
====
Error in R process: simpleError : You have a 32-bit version of Java. H2O works best with 64-bit Java. Please download the latest Java SE JDK 8 from the following URL: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
====
It seems that Java version issue so I tried to changed Java from openjdk (default installed EC2) to Oracle JDK which downloaded from above URL. But error message was same.
These Java was 64bit. (jdk-8u231-linux-x64.rpm or jdk-8u231-linux-x64.tar.gz)

could you please let me know If you have any idea for solve this issue ?
0 Kudos

Labels

?
Labels (1)
A banner prompting to get Dataiku