gpt4 book ai didi

java - 在 Raspberry Pi 上使用 Amazon Echo 控制 OpenHAB

转载 作者:行者123 更新时间:2023-11-30 07:38:50 25 4
gpt4 key购买 nike

所以我在 Raspberry Pi 中运行 OpenHAB,并将 .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 $

最佳答案

莫娜,

您尝试使用 Java 7 运行 Jar 文件,而该文件设计为在 Java 8 上运行。安装 Java 8 并使用它运行 Jar 来修复错误。

关于java - 在 Raspberry Pi 上使用 Amazon Echo 控制 OpenHAB,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34982540/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com