When I debug the springboot project in idea, the exception occurs: java.io.FileNotFoundException: \C:\Program Files\Java\jdk1.8.0_191\jre\lib\sunrsasign.jar, But in fact, the JDK 1.8 used in the project does not have this file, and I cannot find any association with this exception from the code and configuration, which makes me very confused
I tried to clear the target directory of the project and rebuild it, as well as create an empty file named sunrsasign.jar in the corresponding directory, but in fact, the operating system does not allow this. I checked the idea configuration and did not find any obvious problems with the JDK version information. When searching online, due to historical issues, the jar package was integrated into another place, so normal debugging should not find this file. Of course, this is my guess, and I don't actually know why JVM searches for this file when debugging runs
-
java 1.8 is over a decade and the code you're using is even older than that, written with the assumption of an implementation detail that hasn't been true for 20 years. Update your software, this stuff is no longer supported.rzwitserloot– rzwitserloot2025年10月16日 13:32:23 +00:00Commented Oct 16 at 13:32
-
1Welcome to Stack Overflow! Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to help you. See How to Ask for help clarifying this question. Include: 1) a minimal reproducible example, 2) edit your question to add the provider of your JDK and JVM. 3) JDK 1.8.0_191 was released in 2018. The latest JDK 8 bugfix was released this year. Have you tried with with recent release? 4) Add the actual verbatim error to the question including the stacktrace.aled– aled2025年10月16日 14:25:41 +00:00Commented Oct 16 at 14:25
-
Probably related to stackoverflow.com/questions/15885401/…. Your application probably needs to be updated to use the current methods as @rzwitserloot mentioned instead of a method outdated in 2004.aled– aled2025年10月16日 14:27:54 +00:00Commented Oct 16 at 14:27
-
1And, to be clear, your question poses a fact that is incorrect. You do not 'require searching for sunrsasign.jar' to debug java code. Instead, your debugger is not compatible with JDK1.8 and up. The fix is to update your debugger.rzwitserloot– rzwitserloot2025年10月16日 14:36:17 +00:00Commented Oct 16 at 14:36
-
1@rzwitserloot actually, it’s not the debugger alone to blame...Holger– Holger2025年10月20日 12:46:29 +00:00Commented Oct 20 at 12:46
1 Answer 1
There is indeed the problem that the JVM itself places a reference to the non-existing file into the boot class path, as acknowledged by bug report JDK-8195794.
We can even verify with an online JDK that the sunrsasign.jar is inside the path.
However, this normally doesn’t prevent debugging. We would have noticed if all versions from Java 5 to Java 8 had the problem of not allowing debugging. Normally, the JVM has no issue with path entries referring to non-existing files. It must be a tool of your debug infrastructure which tries to read all files in that path without tolerance toward non-existing files.
So your options are
update the Java version
update your debug tool(s)
override the bootclasspath using
-Xbootclasspath, to only include the existing files