Weird issue after 19.10 upgrade

I guess the root cause of the issue is not Mate, still I hope you can guide me to a solution. The issue is as follows:

I had a running mvn setup on 19.04. After 19.10 upgrade, I started getting following error on "mvn -version":

Error: Could not find or load main class org.codehaus.plexus.classworlds.launcher.Launcher
Caused by: java.lang.ClassNotFoundException: org.codehaus.plexus.classworlds.launcher.Launcher

I dig into the issue little bit. In my setup, "/usr/share/maven" is a symbolic link to a folder under my home directory (~/Programs/maven). Using Mate Terminal, when "ls .." command is run under "/usr/share/maven", contents of ~/Programs is listed. However, as far as I remember, before upgrade, it was displaying /usr/share contents.

Why symbolic links are handled this way ? How can I return back to prior behaviour ?

I'm not sure how maven is supposed to set up, and I can't see a maven package, but I'm guessing the program is unpacked and ran straight from a directory.

I'd suggest removing the link /usr/share/maven and editing your PATH variable to point to the bin folder of where Maven is located.

rm /usr/share/maven
echo "PATH:~/Programs/maven/bin:$PATH" >> ~/.bash_aliases
export MAVEN_HOME=~/Programs/maven >> ~/.bash_aliases

Then restart the terminal for the new variables to take effect.


Mainly this is to avoid symlinks from a system wide directory to your home directory, and retain the Filesystem Hierarchy Standard. /usr/share/ is for data files, and /opt/ is usually for these kind of applications that run with its own bundled files that are relative to where they're installed.

Alternately, the problem could be an issue with 19.10's version of Java.