所以我在OpenHAB
内运行Raspberry Pi
并将.jar
文件保存在我的OS X中,并在OS X终端中运行它,我收到以下错误。能告诉我如何解决这个问题吗?
java -jar amazon-echo-bridge-0.2.1.jar –upnp.config.address=192.168.1.105
Exception in thread “main” java.lang.UnsupportedClassVersionError: com/armzilla/ha/SpringbootEntry : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at org.springframework.boot.loader.LaunchedURLClassLoader.doLoadClass(LaunchedURLClassLoader.java:163)
at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:136)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:46)
at java.lang.Thread.run(Thread.java:745)
我已从here下载了jar文件,我正在关注this tutorial。
jar在Raspbian中运行,但我希望从OS X运行它,因为I cannot install Chromium on Raspbian.
然而,即使在Raspbian中运行,我也会收到此错误:
asticsearchAutoConfiguration : Closing Elasticsearch client
2016-01-24 23:07:58.279 INFO 2411 --- [ main] org.elasticsearch.node : [Bres] stopping ...
2016-01-24 23:07:58.336 INFO 2411 --- [ main] org.elasticsearch.node : [Bres] stopped
2016-01-24 23:07:58.337 INFO 2411 --- [ main] org.elasticsearch.node : [Bres] closing ...
2016-01-24 23:07:58.413 INFO 2411 --- [ main] org.elasticsearch.node : [Bres] closed
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:53)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.IllegalStateException: Tomcat connector in failed state
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.start(TomcatEmbeddedServletContainer.java:157)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.startEmbeddedServletContainer(EmbeddedWebApplicationContext.java:288)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:141)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:483)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:686)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:320)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:957)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:946)
at com.armzilla.ha.SpringbootEntry.main(SpringbootEntry.java:14)
... 6 more
pi@raspberrypi /opt/openhab/echo $
答案 0 :(得分:1)
莫纳,
您正在尝试使用Java 7运行Jar文件,而它设计为在Java 8上运行。安装Java 8并使用它来运行Jar来修复错误。