GGTS (Eclipse) 和 JAVA 1.8 中的 JVM 不兼容 [英] Incompatible JVM in GGTS (Eclipse) and JAVA 1.8

查看:34
本文介绍了GGTS (Eclipse) 和 JAVA 1.8 中的 JVM 不兼容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于升级到 Java 1.8,在 GGTS (eclipse) 中运行 grails 应用程序时遇到一些问题.

Having some problem with running a grails application in GGTS (eclipse) due to upgrade to Java 1.8.

堆栈开始于:

Mar 05, 2015 3:51:31 PM org.springsource.loaded.jvm.JVM copyMethod
SEVERE: Problems copying method. Incompatible JVM?
java.lang.reflect.InvocationTargetException
    at sun.reflect.GeneratedMethodAccessor91.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.springsource.loaded.jvm.JVM.copyMethod(JVM.java:134)
    at org.springsource.loaded.ri.OriginalClassInvoker.createJavaMethod(OriginalClassInvoker.java:68)
    at org.springsource.loaded.ri.ReflectiveInterceptor.jlClassGetDeclaredMethods(ReflectiveInterceptor.java:151)
    at org.codehaus.groovy.reflection.CachedClass$3$1.run(CachedClass.java:84)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.codehaus.groovy.reflection.CachedClass$3.initValue(CachedClass.java:81)
...
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1270)
    at org.codehaus.groovy.grails.cli.support.GrailsStarter.rootLoader(GrailsStarter.java:236)
    at org.codehaus.groovy.grails.cli.support.GrailsStarter.main(GrailsStarter.java:264)
Caused by: java.lang.IllegalArgumentException: Can not copy a non-root Method
    at java.lang.reflect.Method.copy(Method.java:151)
    ... 280 more

我曾经在 Java 1.7 中运行相同的应用程序.我的同事升级到 1.8 并且不再能够运行它.

I used to run the same application in Java 1.7. My colleagues upgraded to 1.8 and no longer able to run it.

我使用 SUN JDK 进行了测试,现在我又使用了 OpenJDK,但这无济于事当前 JDK openjdk 版本1.8.0_40"

I tested with SUN JDK and now I am on OpenJDK again and that does not help Current JDK openjdk version "1.8.0_40"

JAVA_HOME、JAVA_PATH 和任何其他变量似乎都指向正确的 JDK 安装.我已经删除了以前的所有内容(从操作系统中删除了 JDK 1.6 和 1.7,以确保没有对它们的引用).

JAVA_HOME, JAVA_PATH and any other variable seems to point to the correct JDK installation. I have removed all the previous (JDK 1.6 & 1.7 from the OS to be sure that there is no reference to them).

出于某种原因,GGTS 仍然抱怨 JVM 错误.我知道该错误可能与编译器 1.7 试图在 1.8 中编译文件有关,但我不确定此引用在 eclipse 中的来源.

For some reason GGTS still complains for a wrong JVM. I understand the error might be related to a compiler 1.7 trying to compile files in the 1.8, but I am not sure where this reference is comming from in eclipse.

我的Eclipse安装信息在Java下列出如下:

My Eclipse installation information lists the following under Java:

-vm
/usr/lib64/jvm/jre-1.8.0-openjdk/bin/java
eclipse.home.location=file:/home/arb/dev/applications/ggts-3.6.3.SR1/
eclipse.launcher=/home/arb/dev/applications/ggts-3.6.3.SR1/GGTS
eclipse.launcher.name=GGTS
eclipse.p2.data.area=@config.dir/../p2
eclipse.p2.profile=DefaultProfile
eclipse.product=org.springsource.ggts.ide
eclipse.startTime=1425566898624
eclipse.stateSaveDelayInterval=30000
eclipse.vm=/usr/lib64/jvm/jre-1.8.0-openjdk/bin/java
eclipse.vmargs=-Dgrails.console.enable.interactive=false
-Dgrails.console.enable.terminal=false
-Djline.terminal=jline.UnsupportedTerminal
-Dgrails.console.class=grails.build.logging.GrailsEclipseConsole
-Dosgi.requiredJavaVersion=1.6
-Xms60m
-Xmx1024m

推荐答案

jdk8u40的问题,回到jdku31.它适用于该版本.我在 windows 和 linux 环境中都遇到了同样的问题.

It's a problem related to jdk8u40, go back to jdku31. It works in that version. I'm running into the same problem both in windows and linux environments.

这篇关于GGTS (Eclipse) 和 JAVA 1.8 中的 JVM 不兼容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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