yaskor opened a new issue, #7978:
URL: https://github.com/apache/netbeans/issues/7978

   ### Apache NetBeans version
   
   Apache NetBeans 23
   
   ### What happened
   
   Issue: Error displayed incorrectly when verifying the JDK version
   
   The issue occurs when the file path to the JDK contains spaces. For example, 
in my case:
   `c:\Program Files\Eclipse Adoptium\jdk-21.0.5.11-hotspot\bin\java`
   
   Cause is in 
   `netbeans/java/java.lsp.server/vscode/src/extension.ts`
   The error can be resolved by modifying the function that calls findJDK to 
add quotation marks around javaExecPath:
   
   ```javascript
   let javaCheck = spawnSync(${javaExecPath} -version, { shell: true });
   
   // Change to:
   let javaCheck = spawnSync("${javaExecPath}" -version, { shell: true });
   ```
   
   ### Language / Project Type / NetBeans Component
   
   VS-Code Extension
   
   ### How to reproduce
   
   Start Netbeans-VS-Code Plugin in VS-Code
   Configure JDK 
   The issue occurs when the file path to the JDK contains spaces. For example, 
in my case:
   
   
   ### Did this work correctly in an earlier version?
   
   No / Don't know
   
   ### Operating System
   
   Windows 11 x64
   
   ### JDK
   
   JDK 21
   
   ### Apache NetBeans packaging
   
   Apache VSNetBeans for VSCode
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request?
   
   Yes


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to