After doing so the javac command is not in the path. I then ran the command to select java11.
sudo alternatives --config java
But the path still does not contain javac. I also closed and reopened the terminal to see if the path would update to no avail. Is there a document describing how to install and select the javac command? The command “java -version” does return version 11. However commands “javac -version” and “which javac” return command not found.
I did find javac in /usr/share/bash-completions/completions/javac by changing to the root directory and using the command:
sudo . -name javac -print
I’m assuming I need to add alternatives for javac?
Hi @ksanger . Welcome to the community. Please take a minute to go through the posts in the #start-here category if you have not had a chance to do yet.
So. javac is the Java compiler, right?
Maybe it is not included in the java-latest-openjdk package, because it is a development tool.
Indeed if you install java-latest-openjdk-devel, you can find javac.
In addition, are you sure that installing java-latest-openjdk it install openjdk version 11?
Thanks; I had assumed that openjdk was a java developement kit ie java development kit. I’ll install java-latest-openjdk-devel next. I would have named openjdk openjre. Then the name would mean it was a java runtime environment and not a java development kit. Which it is. Must be missing something as openjdk without a javac command makes no sense to me.
The -devel package you were going to install next includes any bits that are required for development.
Fedora packages must be designed with a logical separation of files. Specifically, -devel packages must be used to contain files which are intended solely for development or needed only at build-time. This is done to minimize the install footprint for users.
Yes. In over 20 years I cannot remember ever seeing an implementation of JDK (which does indeed stand for Java Development Kit) that did not have a compiler.
Based on this and several other threads, it seems like there must be a well-known secret around the unspoken argument: “There should always be basic developer tools in the Java (D)evelopment Kit” versus “There should always be a -devel in the package name of a development package.”
And those of us who used it many other places just have not been let in on it…