简体   繁体   English

Java Jar 从命令行开始,但不是从 Intellij 想法开始

[英]Java Jar starts from command line , but not from intellij idea

I am able to start the server with the command line 'java -jar jarname.jar But , while running main method of the spring boot application , server start fails ,saying that a class from an imported dependency project does not exists我可以使用命令行“java -jar jarname.jar”启动服务器但是,在运行 spring boot 应用程序的 main 方法时,服务器启动失败,说不存在来自导入的依赖项项目的类

Caused by: java.lang.NoClassDefFoundError: Lcom/jj/db/repositories/KKRepository;

Also there is a warning message in the console :控制台中还有一条警告消息:

2021-11-15 11:04:47 WARN  WebappClassLoaderBase:173 -   - The web application [MM] appears to have started a thread named [RxIoScheduler-1 (Evictor)] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215) java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)

Can anyone please help ?任何人都可以帮忙吗?

将其作为单个模块项目或在清单中适当指定,而不是多模块项目。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM