How to install JRuby-9.1.13.0 with Java 9? - java

I'm trying to install JRuby-9.1.13.0 with rbenv on MacOS.
The issue is that for some reason still Java 7 (1.7) is required, which no longer officially supported.
rbenv install --verbose jruby-9.1.13.0
ERROR: Java 7 required. Please install a 1.7-compatible JRE.
BUILD FAILED (OS X 10.13.1 using ruby-build 20170914)
The JRuby wiki mentions that Java SE should be installed, but not which specific version.
Installed is Java 9.
java -version
java version "9.0.1"
Java(TM) SE Runtime Environment (build 9.0.1+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)
A Java 8 version is also installed.
jenv versions
system
* 1.8 (set by /Users/<folder>/.java-version)
1.8.0.152
9.0
9.0.1
oracle64-1.8.0.152
oracle64-9.0.1
Is Java 7 really a requirement for installing JRuby and therefor my setup is wrong?
Or is this an issue of JRuby or rbenv and installing JRuby should be also possible with Java 9 (Java 8)?

IIRC I fixed the jenv setup and switched to Java 1.8, then I was able to install JRuby.

Related

How do I install Cassandra 4 RPM package when only Java 11 is installed?

Cassandra 4 should work with java 11, but when I try to install it without java 8 then the installation fails:
error: Failed dependencies:
jre >= 1.8.0 is needed by cassandra-4.0.4-1.noarch
How can I get around this?
My current workaround is to install both java 8 and java 11, that way I satisfy the dependency requirement and can run cassandra 4 with java 11. However, there must surly be a better way?
I would of course prefer to only have java 11 installed.
Some extra info:
I use CentOs 7 and RHEL 8
Cassandra rpm downloaded from https://downloads.apache.org/cassandra/redhat/40x/
java -version
openjdk version "11.0.9.1" 2020-11-04 LTS
OpenJDK Runtime Environment 18.9 (build 11.0.9.1+1-LTS)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.9.1+1-LTS, mixed mode, sharing)
Since JRE is no longer available in Java 11 (JDK 11 release notes):
In this release, the JRE or Server JRE is no longer offered. Only the JDK is offered.
we probably shouldn't require the JRE as a dependency on CentOS and RHEL platforms:
Requires: jre >= 1.8.0
As a workaround, you can override the dependency check when installing the RPM with the --nodeps option. For example:
$ sudo rpm --nodeps -i cassandra-4.0.4-1.noarch.rpm
In the meantime, I've logged CASSANDRA-17669 for resolution. Cheers!

confusion by java versions in my MacOs(Catalina)

Recently, I want to upgrade my java from 8 to 11. Then checking my machine using java -version, it shows as follows:
java version "1.8.0_251"
Java(TM) SE Runtime Environment (build 1.8.0_251-b08)
Java HotSpot(TM) 64-Bit Server VM (build 25.251-b08, mixed mode)
Then, I think there is only java-8 there. But then I use homebrew with brew install java11 it shows this:
==> Formulae
app-engine-java java javacc jslint4java pdftk-java
google-java-format java11 ✔ javarepl libreadline-java
==> Casks
eclipse-java eclipse-javascript oracle-jdk-javadoc homebrew/cask-versions/java-beta
If you meant "java" specifically:
It was migrated from homebrew/cask to homebrew/core.
I am confused now: are these 2 versions installed in my machine, or only one there? If 2 here, how to I specify the path if I want to use java11.
In Homebrew, java11 is an alias for the formula openjdk#11. What you want is a cask, specifically temurin11, which can be installed by running this command:
brew install homebrew/cask-versions/temurin11
(Temurin is the official successor of AdoptOpenJDK.)

How to update java on macOS Sierra 10.12

I am trying to install eclipse-cpp oxygen on macOS Sierra 10.12. While installing it i get an error that java version is not 1.8, while I had already installed latest JDK package. on terminal it shows java version as below
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)
Please suggest how can I upgrade my java version.
Apple don't provide a version of Java greater than Java 6. You must install Java 8 from the Oracle site.
In order to run Eclipse you must install the full JDK, the JRE download is not enough as it does not include the java executable.
The Oracle site is here
You can install Java8 from here.
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
make sure to check the latest binaries of java and javac in PATH. You can override the old java binaries in path.

Cant run eclipse on my Mac

I installed the latest version of Java and when I try to run eclipse it says:
Version 1.6.0_65 of the JVM is not suitable for this product. Version: 1.8 or greater is required.
I searched many forums and found the java -version command. When I run from the terminal I get:
java version "1.6.0_65" Java(TM) SE Runtime Environment (build
1.6.0_65-b14-466.1-11M4716) Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-466.1, mixed mode)
But when I open Java on my system preferences it says I have 1.8.
Why? What do I do?
It says 1.6 because it is the pre-installed version in your system. But in order to install different version of Java, you need to install the latest development kit from Oracle's website i.e. http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

why java version not updated on mac machine?

I checked my java version from terminal .I got this information
Last login: Sun Mar 15 08:46:08 on ttys000
localhost:~ naveenkumar$ java -version
java version "1.7.0_10"
Java(TM) SE Runtime Environment (build 1.7.0_10-b18)
Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)
localhost:~ naveenkumar$
I install new java 1.8 JRE .close my terminal .Agan i type java -version .I found the same version .
why ? how to upgrade java version.
You installed Java 8 but it didn't overwrite this: /usr/bin/java
The easiest way for you to solve this problem is to install Java 8 JDK, not JRE. After install JDK, your path should be automatically updated.

Categories