为了账号安全,请及时绑定邮箱和手机立即绑定

关于guns采用java application启动报错问题

eclipse配置的jdk是9.0.4版本的,可是在项目中查看是1.8版本的,启动的时候报如下的错误,还得麻烦老师帮忙改正一下,谢谢

Exception in thread "main" java.lang.ClassCastException: java.base/jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to java.base/java.net.URLClassLoader

at org.springframework.boot.devtools.restart.DefaultRestartInitializer.getUrls(DefaultRestartInitializer.java:93)

at org.springframework.boot.devtools.restart.DefaultRestartInitializer.getInitialUrls(DefaultRestartInitializer.java:56)

at org.springframework.boot.devtools.restart.Restarter.<init>(Restarter.java:140)

at org.springframework.boot.devtools.restart.Restarter.initialize(Restarter.java:546)

at org.springframework.boot.devtools.restart.RestartApplicationListener.onApplicationStartingEvent(RestartApplicationListener.java:67)

at org.springframework.boot.devtools.restart.RestartApplicationListener.onApplicationEvent(RestartApplicationListener.java:45)

at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)

at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)

at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)

at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:122)

at org.springframework.boot.context.event.EventPublishingRunListener.starting(EventPublishingRunListener.java:69)

at org.springframework.boot.SpringApplicationRunListeners.starting(SpringApplicationRunListeners.java:48)

at org.springframework.boot.SpringApplication.run(SpringApplication.java:292)

at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118)

at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107)

at com.stylefeng.guns.GunsApplication.main(GunsApplication.java:20)


正在回答

2 回答

将jdk版本改为1.8

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

关于guns采用java application启动报错问题

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信