My Profile Photo


A Thinker, Innovator, Enthusiastic Software Developer, Amateur sketch maker, Recreational Singer, Thought leader and Sometimes clumsy. :-)

22 - Eclipse Error: Unable to create selected Preference Page

Ubuntu : 16.04 LTS

Eclipse: Luna Service Release 2 (4.4.2)

Java Version: 1.7.0_95

I was not able to run simple java program also. While changing preference, it alerts error, Unable to create selected preference page.

Checked .log file in workspace .metadata directory.

After a bit scrolling down, the actual error was this

Caused by: java.lang.NoClassDefFoundError: Could not initialize 
at org.eclipse.jdt.internal.debug.core.JDIDebugOptions.<clinit>
at org.eclipse.jdt.internal.debug.core.JDIDebugPlugin.start
at org.eclipse.osgi.internal.framework.BundleContextImpl$
at org.eclipse.osgi.internal.framework.BundleContextImpl$
at Method)
at org.eclipse.osgi.internal.framework.BundleContextImpl.


tzdata-java was removed in Xenial 16.04, because OpenJDK 8 does not provide the necessary files to build it. Quoting the Debian bug report which prompted its removal:

The problem is that the default java has recently been switched to openjdk-8, which doesn’t provide javazic.jar. As such we can’t build tzdata-java anymore.


sudo add-apt-repository ppa:justinludwig/tzdata
sudo apt-get update

Also, add below line in eclipse.ini

Restart your eclipse, Solved :)