You are not logged in.

#1 2024-02-19 12:34:49

strolnoroso
Member
Registered: 2022-02-07
Posts: 2

Cannot find javac

Hello community,

I'm unable to find javac on my system after installing openjdk-21. What am I missing? My understanding is that openjdk includes both the JVM and the JDK and that they are called by the commands java and javac respectively in the terminal. Or am I misunderstanding? Haven't read all the relevant documentation available, because I have trouble finding the relevant information.

archlinux-java status returns the following:
Available Java environments:
java-21-openjdk (default)

My $PATH variable includes the following:
/usr/lib/jvm/default/bin
/usr/lib/jvm/java-21-openjdk/bin/ (added manually)

Full $PATH (messy)
/usr/lib/jvm/java-21-openjdk/bin/:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/ju/.local/bin:/home/ju/.local/bin:/home/ju/.local/bin

I have tried running archlinux-java fix. I have not yet tried using a different openjdk.

Many thanks

Offline

#2 2024-02-19 12:59:39

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 13,870

Re: Cannot find javac

$ pacman -F javac
extra/bash-completion 2.11-3 [installed]
    usr/share/bash-completion/completions/javac
extra/java-environment-common 3-5
    usr/bin/javac
extra/jdk-openjdk 21.0.2.u13-3
    usr/lib/jvm/java-21-openjdk/bin/javac
extra/jdk11-openjdk 11.0.22.u7-1
    usr/lib/jvm/java-11-openjdk/bin/javac
extra/jdk17-openjdk 17.0.10.u7-1
    usr/lib/jvm/java-17-openjdk/bin/javac
extra/jdk8-openjdk 8.402.u06-1
    usr/lib/jvm/java-8-openjdk/bin/javac
extra/pycharm-community-edition 2023.3.3-1
    usr/share/pycharm/jbr/bin/javac
$

Archlinux has 3 packages for every java version it supports, a java runtime for headless systems, a runtime for all systems AND a development kit .

javac is in the development kit and you probably installed the runtime .

See https://wiki.archlinux.org/title/Java#OpenJDK for details


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

#3 2024-02-19 13:15:46

strolnoroso
Member
Registered: 2022-02-07
Posts: 2

Re: Cannot find javac

Lone_Wolf wrote:

Archlinux has 3 packages for every java version it supports, a java runtime for headless systems, a runtime for all systems AND a development kit .

javac is in the development kit and you probably installed the runtime .

See https://wiki.archlinux.org/title/Java#OpenJDK for details

I understand now, thank you so much,
Have a good day!

Offline

#4 2024-02-20 10:23:16

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 13,870

Re: Cannot find javac

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

Board footer

Powered by FluxBB