MSCS unable to find installed java
TraumaER opened this issue · comments
I've installed java 19 via SDKMan and am able to see and use it, but mscs
tells me that Java is not found.
Error:
➜ mscs git:(main) mscs list
ERROR: Java not found!
Try installing this with:
sudo apt-get install default-jre
I've got the same setup, mscs + sdkman installed java only, on a raspberry pi that is working. However for some reason on my Ubuntu server desktop mscs is unable to find java.
I edited mscs
and msctl
to print out the PATH
variable and it shows the bin directory where java is located at, but it's still unable to find it.
mscs path -- /home/traumaer/.sdkman/candidates/java/19-amzn/bin:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
msctl path -- /home/traumaer/.sdkman/candidates/java/19-amzn/bin:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
ERROR: Java not found!
Try installing this with:
sudo apt-get install default-jre
If I follow the suggestion of sudo apt-get install default-jre
it is able to find java. However, it'll only ever use Java 11 that is installed that way and not use my Java 19.
Any help would be greatly appreciated.
Environment:
Distributor ID: Ubuntu
Description: Ubuntu 22.10
Release: 22.10
Codename: kinetic
Hardware:
➜ mscs git:(main) inxi -F
System:
Host: mc-box Kernel: 5.19.0-26-generic arch: x86_64 bits: 64 Console: pty pts/0 Distro: Ubuntu
22.10 (Kinetic Kudu)
Machine:
Type: Desktop Mobo: ASRock model: FM2A88X-ITX+ serial: <superuser required>
BIOS: American Megatrends v: P2.40 date: 08/01/2014
CPU:
Info: quad core model: AMD A8-6600K APU with Radeon HD Graphics bits: 64 type: MT MCP cache:
L2: 4 MiB
Speed (MHz): avg: 1898 min/max: 1900/3900 cores: 1: 1900 2: 1900 3: 1896 4: 1896
Graphics:
Device-1: AMD Richland [Radeon HD 8570D] driver: N/A
Display: server: No display server data found. Headless machine? tty: 209x51
API: N/A Message: No display API data available in console. Headless machine?
Audio:
Device-1: AMD Trinity HDMI Audio driver: snd_hda_intel
Device-2: AMD FCH Azalia driver: snd_hda_intel
Sound API: ALSA v: k5.19.0-26-generic running: yes
Network:
Device-1: Qualcomm Atheros AR9462 Wireless Network Adapter driver: ath9k
IF: wlp1s0 state: down mac: dc:85:de:b8:39:34
Device-2: Qualcomm Atheros QCA8171 Gigabit Ethernet driver: alx
IF: enp3s0 state: up speed: 1000 Mbps duplex: full mac: d0:50:99:52:c4:61
IF-ID-1: docker0 state: down mac: 02:42:ae:d5:8e:71
Bluetooth:
Device-1: IMC Networks type: USB driver: btusb
Report: rfkill ID: hci0 rfk-id: 1 state: down bt-service: not found rfk-block: hardware: no
software: no address: see --recommends
Drives:
Local Storage: total: 119.24 GiB used: 14.78 GiB (12.4%)
ID-1: /dev/sda vendor: Samsung model: SSD 850 PRO 128GB size: 119.24 GiB
Partition:
ID-1: / size: 57.4 GiB used: 14.65 GiB (25.5%) fs: ext4 dev: /dev/dm-0
ID-2: /boot size: 1.9 GiB used: 135.4 MiB (7.0%) fs: ext4 dev: /dev/sda2
Swap:
ID-1: swap-1 type: file size: 4 GiB used: 0 KiB (0.0%) file: /swap.img
Sensors:
Src: /sys System Temperatures: cpu: 7.4 C mobo: N/A
Fan Speeds (RPM): N/A
Info:
Processes: 129 Uptime: 21h 25m Memory: 14.57 GiB used: 620.6 MiB (4.2%) Init: systemd
target: graphical (5) Shell: Zsh inxi: 3.3.24
Derp, So apparently Ubuntu is a little more Security conscious than PiOS. The reason why mscs
was unable to see java even though the directory was on the PATH
is because it was in my home directory and it didn't have permission.
Solution: Uninstall sdkman from my user home directory and install it under /usr/local/sdkman
this gave the minecraft
user the ability to see it.
Glad you got it figured out