Bug – Platform won’t launch on Java 9-ea builds (InjectionException: NoClassDefFoundError: javax/annotation/PostConstruct)
https://bugs.eclipse.org/bugs/show_bug.cgi?id=493761
Environment:
OS: elementary OS 0.4 Loki (64-bit)
“Ubuntu 16.04.2 LTS” based
$ java -version
java version "9-ea"
Java(TM) SE Runtime Environment (build 9-ea+162)
Java HotSpot(TM) 64-Bit Server VM (build 9-ea+162, mixed mode)
Installation
- Extract a File: eclipse-jee-neon-3-linux-gtk-x86_64.tar.gz
-
Change the
eclipse.ini
file
Add the following before--launcher.appendVmargs
--launcher.GTK_version
2
and the following after -vmargs
--add-modules=java.se.ee
From the eclipse.ini:
openFile
--launcher.GTK_version
2
--launcher.appendVmargs
-vmargs
--add-modules=java.se.ee
-Dosgi.requiredJavaVersion=1.8
For easy access to Eclipse, lets create a launcher shortcut:
$ sudo nano /usr/share/applications/eclipse.desktop
; Change the location of eclipse and -vm
option
; With the following contents:
[Desktop Entry]
Version=1.0
Type=Application
Name=Eclipse Neon.3
GenericName=Programming Editor
Comment=Eclipse IDE, Integrated Development Environment
Exec=/opt/eclipse/eclipse -vm /usr/lib/jvm/java-9-oracle/bin
Icon=/opt/eclipse/icon.xpm
Categories=Application;Development;Java;IDE
MimeType=text/plain;text/x-java;
StartupNotify=true
Terminal=false