Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A way to specify JDK while installing JRuby #5413

Open
progressive-galib opened this issue Nov 28, 2023 · 1 comment
Open

A way to specify JDK while installing JRuby #5413

progressive-galib opened this issue Nov 28, 2023 · 1 comment

Comments

@progressive-galib
Copy link

progressive-galib commented Nov 28, 2023

I had JRuby installed manually with OpenJDK 21. I then uninstalled JRuby so that I could install it using RVM. However, RVM is not using my pre-installed JRE. Instead, it is trying to install openjdk-6-jre-headless, which is missing from the Ubuntu PPA. Additionally, openjdk-6-jre is not compatible with the Java libraries I need to work with.

I would like to be able to install JRuby using RVM with my own JRE.

ps: gist of logs https://gist.github.com/progressive-galib/ef44f6ccf142e660c98abb62e9ec6284

@progressive-galib
Copy link
Author

progressive-galib commented Nov 28, 2023

i dont know if it is the proper way but fixed by finding out where java is then using update-alternatives to create a alt for java


(base) galib@galib:/mnt/c/Users/mahfu$ whereis java
java: /usr/share/java /home/galib/.sdkman/candidates/java/23.1.r21-nik/bin/java
(base) galib@galib:/mnt/c/Users/mahfu$ which java
/home/galib/.sdkman/candidates/java/current/bin/java
(base) galib@galib:/mnt/c/Users/mahfu$ sudo update-alternatives --install /usr/bin/java java /home/galib/.sdkman/candidates/java/current/bin/java 2
[sudo] password for galib:
update-alternatives: using /home/galib/.sdkman/candidates/java/current/bin/java to provide /usr/bin/java (java) in auto mode
(base) galib@galib:/mnt/c/Users/mahfu$ rvm install jruby

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant