Java issue with h2o - not recognizing java version - java

I've always used a Mac and don't remember encountering this in the past so I'm not sure what I'm doing wrong. Theres a bit of q's on this on the internet already but I didn't find a solution yet for me.
I just got a new mac and I'm trying to use rJava & h2o specifically. Below is a couple of things I ran and the output from them. Can someone help me out?
Java --version
java --version java 10.0.1 2018-04-17 Java(TM) SE Runtime Environment
18.3 (build 10.0.1+10) Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.1+10, mixed mode)
Javac --version
javac 10.0.1
/usr/libexec/java_home -V
Matching Java Virtual Machines (2):
10.0.1, x86_64: "Java SE 10.0.1" /Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home
1.8.0_171, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home
/Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home
Sys.getenv('JAVA_HOME')
"/Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk"
library(h2o)
h2o.init()
H2O is not running yet, starting it now... Error in value[3L] : You have a 32-bit
version of Java. H2O works best with 64-bit Java. Please download the
latest Java SE JDK 7 from the following URL:
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
I definitely have the 64 bit of java installed as I re-installed it to be sure and see above the x64 notification from the output. Also, I have gotten this to work on another computer and so I don't understand what is going on with this one.
I also did
vim ~/.bash_profile
EXPORT JAVA_HOME = "/Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk"
but this doesn't seem to help me target the Java 8.

You have various problems.
H2O currently does not support Java 10 (that you are using). You need to use Java 8 or Java 7.
Supported versions include: Java 7 or later.
Note: Java 9 is released, but is not currently supported.
Java 9 support will be added in an upcoming version.h2o website
For rJava on Mac I send you to
Loading rJava on Mac OS High Sierra
I am running h2o on a mac with high sierra (and rJava, for a different project) with R v. 3.4.4 and Java 8. All good.

Related

Java version - compile libraries versus JRE

I'm trying to determine if java programs I write will run on a user's computers that may have only Java 8 or Java 11.
On my Windows 10 laptop, I have 4 Java versions installed; jdk1.8.0_281, jdk-12.0.2, jre1.8.0_311, and zulu-11.
Querying the java version in the command prompt yields
openjdk version "11.0.13" 2021-10-19 LTS
OpenJDK Runtime Environment Zulu11.52+13-CA (build 11.0.13+8-LTS)
OpenJDK 64-Bit Server VM Zulu11.52+13-CA (build 11.0.13+8-LTS, mixed mode)
The Apache NetBeans IDE shows I have Java Platforms 1.8, 11, and 12. 12 is the default.
If I build a small System Info application (using System.getProperty("java.version")) with Java 8 or 11 platforms and run it within NetBeans, it reports
This computer is running Java version 1.8.0_281
or
This computer is running Java version 11.0.13
However if I run the program from Windows (outside NetBeans) it reports
This computer is running Java version 12.0.2
I'm confused.

Minecraft Client environment not running through vscode on MAC

For some reason this issue is to do with with gradle and yarn, no matter what I do to try and get the 'fabric-loom' plugin working, nothing works. It says i am using an outdated version of Java, that i'm on Java 11 (I'm not, I did 'java -version' in the bash terminal), I'm on Mac btw, and it said I'm on Java 16.0.2, which is the version it tells me to be on, I'll attach logs and some code I wrote. If someone could help me, that would be great, thanks in advance :)
Crash Log:
Could not run phased build action using connection to Gradle distribution 'https://services.gradle.org/distributions/gradle-7.2-bin.zip'. Build file '/Users/joeplemople/Desktop/joes blocks/build.gradle' line: 2 An exception occurred applying plugin request [id: 'fabric-loom', version: '0.9-SNAPSHOT'] Failed to apply plugin 'fabric-loom'. You are using an outdated version of Java (11). Java 16 or higher is required.
(This was outputted twice for some reason, idk why)
Terminal Code (Bash):
Displaying what versions of java I have installed JoepleMoples-MacBook-Pro:
joes blocks joeplemople$ /usr/libexec/java_home -V Matching Java Virtual Machines (2): 16.0.2, x86_64: "Java SE 16.0.2" /Library/Java/JavaVirtualMachines/jdk-16.0.2.jdk/Contents/Home 11.0.12, x86_64: "Java SE 11.0.12" /Library/Java/JavaVirtualMachines/jdk-11.0.12.jdk/Contents/Home
Me setting the default version of Java to Java (JDK) 16:
/Library/Java/JavaVirtualMachines/jdk-16.0.2.jdk/Contents/Home JoepleMoples-MacBook-Pro:joes blocks joeplemople$ export JAVA_HOME=$(/usr/libexec/java_home -v 16.0.2) JoepleMoples-MacBook-Pro:joes blocks joeplemople$ java -version java version "16.0.2" 2021-07-20 Java(TM) SE Runtime Environment (build 16.0.2+7-67) Java HotSpot(TM) 64-Bit Server VM (build 16.0.2+7-67, mixed mode, sharing)
Thanks in advance
:)
Open Command Palette and choose Java: Configure Java Runtime, select jdk16 for both Project JDKs and Java Tooling Runtime.
Then reload window to make change effective and see if the error goes away.

JDK not found on Debian 8.5

I want to make a python-android-app using this software. I have installed java JDK, when i run java -version i get:
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)
However running the line python android.py installsdk from witin rapt directory (as described in the tutorial) tells me that i have no JDK:
I'm compiling a short test program, to see if you have a working JDK
on your system.
I was unable to use javac to compile a test file. If you haven't
installed the Java Development Kit yet, please download it from:
http://www.oracle.com/technetwork/java/javase/downloads/index.html
The JDK is different from the JRE, so it's possible you have Java
without having the JDK. Without a working JDK, I can't continue.
You need to set your jdk to be accesible, and within path / java home :)
Here help from google:
To set JAVA_HOME environment variable, do the following: Launch
Terminal by pressing Ctrl + Alt + T on your keyboard. Depending on
where you installed your Java, you will need to provide the full path.
For this example, I installed Oracle JDK 7 in the
/usr/lib/jvm/java-7-oracle directory.Aug 13, 2012

"Error: This Java instance does not support a 32-bit JVM." [1] "Please install the desired version."

I'm using Processing 1.5.1 for Mac OS X El Capitan and when I run some code on my app it displays that message. When I type java -version I get:
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-468-11M4833)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-468, mixed mode)
and when I type /usr/libexec/java_home -V I get:
Matching Java Virtual Machines (3):
1.8.0_65, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home
1.6.0_65-b14-468, x86_64: "Java SE 6" /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
1.6.0_65-b14-468, i386: "Java SE 6" /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home
I've tried setting JAVA_HOME to:
export JAVA_HOME=`/usr/libexec/java_home -v 1.6.0_65-b14-468`
but still when I reopen Processing it still displays the same error. Any help or suggestions to force it to run JVM 32-bit?
Processing 1.5 is pretty old. I wouldn't use it unless you have a very specific reason to do so. And even then, you should probably try to find a workaround.
Instead, you should try to use the latest version of Processing (right now, version 3.1.1) if at all possible. But you're using a library that hasn't upgraded yet, so you have to rely on 2.2.1.
Version 2.2.1 added a bunch of stuff over Processing 1.5, including:
Better 32 and 64-bit support. We now support separate 32- and 64-bit libraries and have added separate 32- and 64-bit versions of the Processing download. On Mac OS X, you can even select which mode you'd like to use.
I don't know if this is exactly what fixed your problem, but I would bet that Processing 2.2.1 added something that fixed the issue.
As soon as your library upgrades to Processing 3, you should upgrade your Processing version.
Selecting JVMs on a mac is a pain. I use Jenv. You could try using jenv to select a specific Java version.
brew install jenv
or have a look here:
http://www.jenv.be/
You need to register your JVMs to set it up but you can then set a default JVM and also a default local JVM for a particular directory. Very handy.
You might need to run the following correctly set JAVA_HOME:
jenv exec [your app]
Good luck.

Unable to install Java Runtime (6) on Mac

I'm having a problem of installing java SE runtime 6 on mac, without that, I can't open my eclipse or install Intellij. However, I download the .dmg through an Apple - Java link, but it just doesn't install!
And there's no error message, just the page of falling installation.
I really don't know how to solve it.
This is kind of an update of my problem... I used to have Java SE runtime 6 and tried to install jdk 1.8 and failed. Same picture appeared. Just said failed installing with no error messages. I guessed might be a conflicts? and deleted Java 6 and basically can't run eclipse & Intellij (this solved thought) I still have java 1.7 here.
I just can't figure out why I can't install (or reinstall) java 1.6 or java 1.8. What could be the problem?
Some system updates:
if I do: "which java":
/usr/bin/java
if "echo $JAVA_HOME":
/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home
if java -version:
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
What could be possibly wrong?!!!????
God
You need to get Java directly from Oracle (http://www.oracle.com/technetwork/java/javase/downloads/index.html) as Apple stopped supporting Java some time ago. Unless you have pressing reasons for using Java 6 I suggest also installing at least Java 7, although you can have all three versions installed and select the appropriate version for the app you want to run/develop.
Edit Also, if you want to use Eclipse or IntelliJ (go for IntelliJ) you want to get the JDK and not the "runtime" (JRE).

Categories

Resources