I have installed openjdk-9-jdk:amd64 on Ubuntu and when I run which javac it shows me a softlink leading to the /etc directory:$ ls -l /usr/bin/javaclrwxrwxrwx 1 root root 23 kwi 13 08:09 /usr/bin/javac -> /etc/alternatives/javacAs far as I know only configuration data should be stored in /etc. Why is javac stored there and should I move this executable?
javac installed in /etc
java;etc
If you look at /etc/alternatives youll see it doesnt contain executables, but more symlinks; for example$ ls -l /etc/alternatives/javaclrwxrwxrwx 1 root root 43 Sep 20  2016 /etc/alternatives/javac -> /usr/lib/jvm/java-8-openjdk-amd64/bin/javacThis is how alternatives are implemented: the binary in the path is a symlink to the alternative in /etc/alternative, which is itself a symlink to the chosen target binary. This selection is configuration data, so /etc is perfectly appropriate. (Alternatives can be used for more than binaries, so youll find manpages etc. in there too.)