Gangmax Blog

Eclipse startup ClassNotFoundError when using shortcut

After I create a shortcut in “Alacarte“ on Ubuntu for “Eclipse” and start “Eclipse” by using the shortcut, I get a “ClassNotFoundError” which complains the “javax.annotation.PostConstruct” class cannot be found. It seems it’s the old problem that no JDK can be found when using the shortcut. The quickest solution I can figure out is:

1
2
cd eclipse
ln -s /usr/lib/jvm/java-8-oracle jre

Then it works as expected.

Comments