gpt4 book ai didi

java - 在 jdk 11 的 intellij idea 中获取 noclassfoundexception : java. sql.SQLException

转载 作者:塔克拉玛干 更新时间:2023-11-03 04:48:20 25 4
gpt4 key购买 nike

我正在使用最新版本的 Intellij Idea,并将 jdk 设置为 11。当我执行我的项目时,它抛出异常 noclassfoundexception:java.sql.SQLException。

在 Intellij 的 java 编译器设置中,我提到项目字节码版本为 11。在项目结构设置中,我也将模块 jdk 设置为 11。

最佳答案

尝试将命令行缩短方式改为“JAR manifest”。

JAR manifest setting for unit test

将我的项目从 Java 8 升级到 Java 11 后,我遇到了完全相同的问题。看起来这是 IntelliJ IDEA 错误。

从这里获取的解决方案提示:https://intellij-support.jetbrains.com/hc/en-us/community/posts/360000022399-Error-running-a-cucumber-test-case-Caused-by-java-lang-NoClassDefFoundError-java-sql-Time

关于java - 在 jdk 11 的 intellij idea 中获取 noclassfoundexception : java. sql.SQLException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52981800/

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