Blog of GangMax

自由之思想,独立之精神

Eclipse Startup ClassNotFoundError When Using Shortcut

| Comments

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.