龙目岛+ Eclipse开普勒 [英] Lombok + Eclipse Kepler

查看:153
本文介绍了龙目岛+ Eclipse开普勒的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,在将Eclipse从Helios更新到Kepler之后,我发现我的Lombok依赖项目充满了错误,因为eclipse看不到@Getter和东西所添加的方法,因此我重新安装了Lombok,但是Eclipse崩溃了或只是没有看到方法,取决于我如何运行它.如果我从Windows资源管理器中的eclipse.exe中运行了该程序,则它开始时不会出现lombok,并且如果我在运行对话框中将其键入,则会像这样崩溃:

So, after updating eclipse from Helios to Kepler, I found my Lombok-dependent project to be full of errors, due to eclipse not seeing the added methods by @Getter and stuff, so i reinstalled Lombok, however eclipse either crashed or just didnt see the methods, depending on how i run it. If I ran it from eclipse.exe from windows explorer, it starts without lombok, and if i type it into the run dialog it just crashes like this:

Java was started but returned exit code=1
   C:\Windows\system32\javaw.exe
   -Dosgi.requiredJavaVersion=1.6
   -Xms40m
   -Xmx512m
   -javaagent:lombok.jar
   -Xbootclasspath/a:lombok.jar
   -XX:MaxPermSize=256m
   -jar C:\Program Files\eclipse \\plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
   -os win32
   -ws win32
   -arch x86_64
   -showsplash C:\Program Files\eclipse\\plugins\org.eclipse.platform_4.3.1.v20130911-1000\splash.bmp
   -launcher C:\Program Files\eclipse\eclipse.exe
   -name Eclipse
   --launcher.library C:\Program Files\eclipse\\plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20130807-1835\eclipse_1503.dll
   -startup C:\Program Files\eclipse\\plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
   --launcher.appendVmargs
   -exitdata 198c_5c
   -product org.eclipse.epp.package.jee.product
   -vm C:\Windows\system32\javaw.exe
   -vmargs
   -Dosgi.requiredJavaVersion=1.6
   -Xms40m
   -Xmx512m
   -javaagent:lombok.jar
   -Xbootclasspath/a:lombok.jar
   -XX:MaxPermSize=256m
   -jar C:\Program Files\eclipse\\plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar 

推荐答案

在使用Eclipse Kepler安装lombok之后,我也看到了同样的问题.为了启动Eclipse,我定义了一个符号链接,该链接指向Eclipse安装目录,并将-data选项传递给eclipse.exe.

I have seen the same problem after installing lombok with Eclipse Kepler. To start Eclipse I defined a symbolic link which points to the Eclipse installation deirectory and which passes a -data option to eclipse.exe.

问题是在eclipse.ini文件中对lombok.jar的引用是相对的.我将这些引用更改为绝对引用,从那时起,lombok起作用了.

The problem was that the references to lombok.jar in the eclipse.ini file were relative. I have changed these references to absolute references and since then lombok works.

在文件eclipse.ini中,我替换了行

-javaagent:lombok.jar
-Xbootclasspath/a:lombok.jar

使用

-javaagent:D:\eclipse\kepler\lombok.jar
-Xbootclasspath/a:D:\eclipse\kepler\lombok.jar

这篇关于龙目岛+ Eclipse开普勒的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆