You are not logged in.
I tried many things, idk where to begin troubleshoot
❯ java -version
openjdk version "22.0.2" 2024-07-16
OpenJDK Runtime Environment (build 22.0.2+9)
OpenJDK 64-Bit Server VM (build 22.0.2+9, mixed mode, sharing)
❯ scala
Error: JAVA_HOME is not defined correctly.
We cannot execute /home/tarun/.cache/coursier/arc/https/github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.24%252B8/OpenJDK11U-jdk_x64_linux_hotspot_11.0.24_8.tar.gz/jdk-11.0.24+8/bin/java
it was running just fine a few days ago
Any help is appreciated
Last edited by dedpul (2024-10-03 07:00:48)
Offline
Java on archlinux doesn't use JAVA_HOME, unless you set it yourself somewhere it will be empty .
Please post the output of archlinux-java status .
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
Java on archlinux doesn't use JAVA_HOME, unless you set it yourself somewhere it will be empty .
Please post the output of archlinux-java status .
I've tried all
❯ archlinux-java status
Available Java environments:
java-11-openjdk
java-17-openjdk
java-21-openjdk
java-22-openjdk (default)
Offline
Ok, the error suggests scala is looking specifically for java 11 .
Let's try to "teach" scala to find java 11.
Please create a script with
#!/bin/sh
export PATH="/usr/lib/jvm/java-11-openjdk/bin/:$PATH"
exec /path/to/application "$@"
as content .
If that fails also, try adding
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk
before the exec .
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
Mod note: Moving to AUR Issues.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Ok, the error suggests scala is looking specifically for java 11 .
Let's try to "teach" scala to find java 11.Please create a script with
#!/bin/sh export PATH="/usr/lib/jvm/java-11-openjdk/bin/:$PATH" exec /path/to/application "$@"
as content .
If that fails also, try addingexport JAVA_HOME=/usr/lib/jvm/java-11-openjdk
before the exec .
funnily enough adding JAVA_HOME like that works.
kill me now
Offline
Glad I could help,
Please prepend [Solved] to the thread title (edit first post)
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
Glad I could help,
Please prepend [Solved] to the thread title (edit first post)
but if arch doesnt use it, why do i need to set it?
why did this happen anyway? I installed it using the instructions on Scala's official site.
and now sbt is broken too...
Offline
Multi-platform applications targeting linux often make assumptions about the setup they encounter.
Typically they (try to) support .deb & rpm installs.
Archlinux does things differently and adjustments are often necessary to get things to run.
I have no idea what went wrong on your scala install, but there is a wiki page for scala and an aur package that is actively maintained.
See https://wiki.archlinux.org/title/Scala
If you're unfamiliar with AUR, read https://wiki.archlinux.org/title/Arch_User_Repository.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline