I’m getting the following error when opening the Example-Java-Widget project in Visual Studio Code: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target.
I found this documentation that relates to my issue: Troubleshooting — MicroEJ Documentation.
I followed the recommendations, my error still persists after applying the update to my JDK (located in C:\Program Files\Eclipse Adoptium\jdk-11.0.23.9-hotspot).
It is maybe because you updated the wrong JDK. To know which JDK is used for your project, launch the action (Ctrl+Shift+P) “Configure Java Runtime” (see VS Code doc). It displays the JDK used, and you can expand the list and mouse hover the JDK to see where it is located.
That’s right, I noticed that the JDK used by default was located in C:\Users\Fab\.vscode\extensions\redhat.java-1.35.1-win32-x64\jre\17.0.12-win32-x86_64
I updated the settings to use the JDK I previously configured and it’s working properly now: