【发布时间】:2017-02-22 00:26:17
【问题描述】:
我在 macOS Sierra 和 Lombok 1.16.14 上使用 Eclipse Neon 2。
当我运行 Lombok 安装程序时,它找不到我的任何 Eclipse 或 IntelliJ IDEA 安装。
因此,我必须通过指向以下文件手动“指定位置”(没有其他目录或文件可以使“安装”按钮变为可点击):
eclipse-standard-neon2/Eclipse.app/Contents/Eclipse/eclipse.ini
安装后,它说“安装完成”,在 eclipse.ini 文件中,最后一行插入了以下行(我粘贴了 eclipse.ini 的全部内容):
-startup
../Eclipse/plugins/org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar
--launcher.library
../Eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.401.v20161122-1740
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.8
-XX:+UseG1GC
-XX:+UseStringDeduplication
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
-Dosgi.requiredJavaVersion=1.8
-Xms256m
-Xmx1024m
-Xdock:icon=../Resources/Eclipse.icns
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
-javaagent:../Eclipse/lombok.jar
lombok.jar 也被自动放置在与 eclipse.ini 相同的目录中:
eclipse-standard-neon2/Eclipse.app/Contents/Eclipse/
但是,当我启动 Eclipse Neon 2 并尝试使用任何 Lombok 注释时,即使我明确声明包导入,它也无法识别其类路径中的库。
另外,当我重新运行 Lombok 安装程序(为了卸载 Lombok)时,它仍然找不到我必须从以前的安装中手动指定的以前的 Eclipse IDE?
当我尝试使用以下命令从命令行运行 Eclipse 时(它仍然无法正常工作并且标准输出中没有列出任何错误):
eclipse-standard-neon2/Eclipse.app/Contents/MacOS$ ./eclipse -vmargs -javaagent:../Eclipse/lombok.jar
这是从标准输出运行的标准输出:
objc[52949]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/MacOS/libjli.dylib (0x100543480) and /Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/libinstrument.dylib (0x1005a54e0). One of the two will be used. Which one is undefined.
org.eclipse.m2e.logback.configuration: The org.eclipse.m2e.logback.configuration bundle was activated before the state location was initialized. Will retry after the state location is initialized.
Starting Groovy-Eclipse compiler resolver. Specified compiler level: unspecified
671 2.4.8.xx-201702132212-e46 = STARTING
672 2.3.11.xx-201702132212-e46 = STARTING
org.eclipse.m2e.logback.configuration: Logback config file: /Users/devuser/DevTools/Java/eclipse/eclipse-standard-neon2/workspace/.metadata/.plugins/org.eclipse.m2e.logback.configuration/logback.1.7.0.20160603-1933.xml
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [bundleresource://462.fwk1881585646:1/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [bundleresource://462.fwk1881585646:2/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
org.eclipse.m2e.logback.configuration: Initializing logback
有人遇到过这个问题吗?
猜猜,我短期内不会有使用/学习 Lombok 的特权。 :(
【问题讨论】:
标签: eclipse macos-sierra lombok