oracle / javavscode

Java platform support for Visual Studio Code for full featured Java development (edit-compile-debug & test cycle)
Apache License 2.0
231 stars 31 forks source link

Fix for issue-74 #173

Closed Achal1607 closed 5 months ago

Achal1607 commented 5 months ago

Backport patch from NB-23. For more info check https://github.com/apache/netbeans/pull/7382

lahodaj commented 5 months ago

I think we need something like:

diff --git a/vscode/src/extension.ts b/vscode/src/extension.ts
index 3fd6e51feb..524dc6b0a3 100644
--- a/vscode/src/extension.ts
+++ b/vscode/src/extension.ts
@@ -1044,7 +1044,8 @@ function doActivateWithJDK(specifiedJDK: string | null, context: ExtensionContex
                     'jdk.hints',
                     'jdk.format',
                     'jdk.java.imports',
-                    'jdk.runConfig.vmOptions'
+                    'jdk.runConfig.vmOptions',
+                    'jdk.runConfig.cwd'
                 ],
                 fileEvents: [
                     workspace.createFileSystemWatcher('**/*.java')

so that the extension can read the CWD.