Whenever I try to run instance of payara server in vscode. Not able to start the server. Following is the error I'm facing in the output window of vs code.
Error: Could not find or load main class Files\payara6\glassfish.lib.grizzly-npn-api.jar Caused by: java.lang.ClassNotFoundException: Files\payara6\glassfish.lib.grizzly-npn-api.jar
- JDK version 11
- Windows 10 pro
- payara version 6.2023.11
Expecting to run a server after clicking run but ended up getting error
This means that Payara can't work properly when it's installed in a location that contains spaces in the path. You probably installed it into the "C:\Program Files" directory.
Move the Payara installation to a directory, which doesn't contain spaces. For example into "C:\payara".
You can also try GlassFish 7, which is very similar to Payara 6, but doesn't use the grizzly npn library and may not suffer from this issue.