Java 如何修复ApacheFelix中的已解析状态?

Java 如何修复ApacheFelix中的已解析状态?,java,cmd,osgi-bundle,apache-felix,Java,Cmd,Osgi Bundle,Apache Felix,这是代码,看起来像 g! lb START LEVEL 1 ID|State |Level|Name 0|Active | 0|System Bundle (4.0.3) 1|Active | 1|Apache Felix Bundle Repository (1.6.6) 2|Active | 1|Apache Felix Gogo Command (0.12.0) 3|Active | 1|Apache Felix Gogo Runtime

这是代码,看起来像

g! lb 
START LEVEL 1
 ID|State  |Level|Name 
  0|Active |    0|System Bundle (4.0.3)
  1|Active |    1|Apache Felix Bundle Repository (1.6.6) 
  2|Active |    1|Apache Felix Gogo Command (0.12.0) 
  3|Active |    1|Apache Felix Gogo Runtime (0.10.0)
  4|Active |    1|Apache Felix Gogo Shell (0.10.0)
  6|Installed | 1|Service Tracker-based dictionary client (1.0.0)
  7|Installed | 1|English dictionary (1.0.0) 
g! start 7 
org.osgi.framework.BundleException: Activator start error in bundle \[7\]. 
at org.apache.felix.framework.Felix.activateBundle(Felix.java:2027) 
at org.apache.felix.framework.Felix.startBundle(Felix.java:1895) 
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:944) 
at org.apache.felix.gogo.command.Basic.start(Basic.java:729) 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 
at java.lang.reflect.Method.invoke(Unknown Source) 
at org.apache.felix.gogo.runtime.Reflective.invoke(Reflective.java:137) 
at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:82) 
at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477) 
at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403) 
at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108) 
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183) 
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120) 
at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89) 
at org.apache.felix.gogo.shell.Console.run(Console.java:62) 
at org.apache.felix.gogo.shell.Shell.console(Shell.java:203) 
at org.apache.felix.gogo.shell.Shell.gosh(Shell.java:128) 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 
at java.lang.reflect.Method.invoke(Unknown Source) 
at org.apache.felix.gogo.runtime.Reflective.invoke(Reflective.java:137) 
at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:82) 
at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477) 
at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403) 
at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108) 
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183) 
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120) 
at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89) 
at org.apache.felix.gogo.shell.Activator.run(Activator.java:75)
 at java.lang.Thread.run(Unknown Source) 
Caused by: 
java.lang.UnsupportedClassVersionError: tutorial/example2/Activator has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0 
at java.lang.ClassLoader.defineClass1(Native Method) 
at java.lang.ClassLoader.defineClass(Unknown Source) 
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findClass(BundleWiringImpl.java:2128) 
at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1432) 
at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:72) 
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1843) 
at java.lang.ClassLoader.loadClass(Unknown Source) 
at org.apache.felix.framework.BundleWiringImpl.getClassByDelegation(BundleWiringImpl.java:1317) 
at org.apache.felix.framework.Felix.createBundleActivator(Felix.java:4170) 
at org.apache.felix.framework.Felix.activateBundle(Felix.java:1972) 
... 32 more java.lang.UnsupportedClassVersionError:

tutorial/example2/Activator has been compiled by a more recent version of the Java Runtime (class file version 53.0),

this version of the Java Runtime only recognizes class file versions up to 52.0
谢谢大家! 谢谢@aschipfl的评论。因为我是新手。 问题解决了。。 我所做的是删除旧版本的java.com,然后重新安装新的稳定版本。 问题是我正在将类编译到一个新版本(53版),但不幸的是
jre仅支持高达52版的jre

单击屏幕快照的错误代码否,我太懒了。提供一个学习机会,我会重新考虑;-)。仅仅发布一些代码和/或错误快照是不够的,您需要提供更多的细节(我们无法确切知道您想要什么)。。。