[已解决]叹息,只需要Project>清洁>建立。使用Run As> Maven build ......没有它。
我尝试使用JavaPoet来构建基于我已经创建的注释的枚举,但是我在添加Maven依赖项时遇到了麻烦。我成功解决了log4j2,H2和Reflections依赖关系,但无法解析JavaPoet。
我无法找到关于此FATAL ERROR
的答案的任何答案,我们非常感谢您的帮助。我使用Eclipse Neon.3,我的笔记本电脑上没有太多内存 - 只有4GB。这是我的Maven构建输出:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building My Project 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ MainClass ---
[INFO] Deleting C:\dev\git\MainClass\target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ MainClass---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ MainClass
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[INFO] Compiling 90 source files to C:\dev\git\MainClass\target\classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.252 s
[INFO] Finished at: 2017-07-08T09:54:56-04:00
[INFO] Final Memory: 15M/169M
[INFO] ------------------------------------------------------------------------
FATAL ERROR in native method: JDWP on getting class status, jvmtiError=JVMTI_ERROR_WRONG_PHASE(112)
JDWP exit error JVMTI_ERROR_WRONG_PHASE(112): on getting class status [util.c:1285]
答案 0 :(得分:3)
每当我执行run maven目标清理安装时,我在Eclipse IDE中也遇到了同样的错误。
构建成功但后面显示错误。
JDWP退出错误JVMTI_ERROR_WRONG_PHASE(112):获取类状态[util.c:1285]
但是很惊讶地发现,在命令提示符下,同样的maven目标在eclipse之外运行完美。
进一步分析,在eclipse中我打开终端窗口并运行下面的命令来了解java编译器/ vm版本
javac -version
java -version
并发现两者都指向了略有不同的版本。
在eclipse.ini文件中添加以下行解决了这个问题。
-vm
C:\Program Files\Java\jdk1.8.0_91\bin\javaw.exe
确保您已将这些行分别添加到以下行
上方--launcher.appendVmargs
-vmargs
请参阅Setting the correct PATH for Eclipse和
的此链接C:\Users\tarun.kumar2>java -version
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b15, mixed mode)
C:\Users\tarun.kumar2>javac -version
javac 1.8.0_91
我希望这会对你有所帮助。