1

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

asked Oct 16 at 13:26
5
  • 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. Commented Oct 16 at 13:32
  • 1
    Welcome 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. Commented 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. Commented Oct 16 at 14:27
  • 1
    And, 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. Commented Oct 16 at 14:36
  • 1
    @rzwitserloot actually, it’s not the debugger alone to blame... Commented Oct 20 at 12:46

1 Answer 1

2

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

answered Oct 20 at 12:43
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.