I added lombok
to my java project in eclipse
. It required me to add the last two lines in eclipse.ini
file as vmargs
.
-showlocation
-vm
/home/$USER/JavaSE8/jdk1.8/bin/java
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20150204-1316
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms500m
-Xmx2g
-Dorg.eclipse.swt.browser.XULRunnerPath=''
-javaagent:/home/$USER/eclipse/4.4-luna-SR2/lombok.jar
-Xbootclasspath/a:/home/$USER/eclipse/4.4-luna-SR2/lombok.jar
I have also added lombok.jar
in libraries
(Project -> Properties -> Libraries) and also moved lombok.jar
to the topmost level in Order and Export tab (Project -> Properties -> Order and Export) in eclipse and JRE System Library (rt.jar, resources.jar, etc.) all are below lombok.jar
. I'm confused about the order in which lombok
main class will be loaded as :
When
eclipse
is launched, theBootstrap
classloader should load all JDK classes in directory of JRE. (But since I have movedlombok.jar
up in Order and Export, above JRE system libraries, will rt.jar be loaded afterlombok.jar
. Mostly No? because bootstrap libraries should always be loaded first no matter WHAT !)Since we also redefined the
bootstrap classpath
using -XBootstrapClasspath option, lombok.jar will be loaded byBootstrap Classloader
.After that
Extensions classloader
loads the classes in lib\ext directory of the JRE.Then
System-Classpath classloader
loads all classes and jars specified by the CLASSPATH environment variable (Does this loading takes into account theOrder and Export
order of libraries?)
Please correct me if I'm wrongly interpreting things here as I'm just newbie trying to understand the ClassLoading maze.