NoClassDefFound: java/sql/Date using JDK 11
DPachs opened this issue · 3 comments
I'm getting a NoClassDefFoundError using IntelliJ with JDK 11.
I have read that there's some deprecated methods on the sql/Date class, but the class itself is not deprecated, so it should be available for me. Everything was working good before i migrated to Java 11. A similar error was ocurring with the javafx classes, but i was able to fix it importing the jdk manually.
stacktrace:
Caused by: java.lang.NoClassDefFoundError: java/sql/Date
at better.files.Scanner$Read$Implicits.$init$(Scanner.scala:96)
at better.files.package$.(package.scala:9)
at better.files.package$.(package.scala)
at better.files.File$.home(File.scala:1456)
at visao.LabVisual$$anon$20.(LabVisual.scala:92)
This has nothing to do with better-files but the Java module system introduced in Java 9. See how to solve this here: https://intellij-support.jetbrains.com/hc/en-us/community/posts/360003549920-Getting-class-not-found-exception-after-shifting-to-JDK-11
This has nothing to do with better-files but the Java module system introduced in Java 9. See how to solve this here: https://intellij-support.jetbrains.com/hc/en-us/community/posts/360003549920-Getting-class-not-found-exception-after-shifting-to-JDK-11
... I did what the instructions in the link tell. Didn't resolve the issue.
What does this look like for you:
What is your error?