RCP应用程序为org.eclipse.osgi抛出UnsupportedClassVersionError

时间:2017-02-20 14:35:50

标签: java osgi eclipse-rcp

RCP应用程序的新功能。在运行应用程序作为启动eclipse应用程序时,它会抛出错误wrt org.eclipse.osgi

java.lang.UnsupportedClassVersionError: Unsupported major.minor version     52.0 at java.lang.ClassLoader.defineClass1(Native Method) 

将Env变量从1.8

降低到1.6

Eclipse版本:Indigo

下面是我的eclipse ini文件

-startup
plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.100.v20110502
-product
org.eclipse.epp.package.rcp.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile

-vm
C:\DEV\jdk1.6.0_45\bin\
-vmargs
-Dosgi.requiredJavaVersion=1.5

-Xms40m
-Xmx512m

如果我遗失了一些东西请传达

1 个答案:

答案 0 :(得分:0)

在jdk 1.8上编译了一个依赖jar。使用1.6重新编译并且它可以工作