vscode-java-debug icon indicating copy to clipboard operation
vscode-java-debug copied to clipboard

Building multi project java workspace with cross dependent modules(Java9)

Open RedIODev opened this issue 3 years ago • 0 comments

[provide a description of the issue]

Environment
  • Operating System: Windows 10
  • JDK version: 19
  • Visual Studio Code version: 1.72.2
  • Java extension version: 1.12.0
  • Java Debugger extension version: 0.45.0
Steps To Reproduce
  1. Open a folder in vscode
  2. Create a file structure like this: FileStructure
  3. Open the folder as a multi project workspace like this: workspace
  4. Make the module main depend on sub1 and sub2
  5. (no errors from linter) run the main
Current Result

Error: Cannot resolve the modulepaths/classpaths automatically, please specify the value in the launch.json

Expected Result

Runs the main modules Main with sub1 and sub2

Additional Informations

I already tried to set the module and classpath variables in multiple ways: as relative paths from main project, as absolute paths with ${workspaceFolder}... , and with and without $auto as part of the lists. I couldn't find good information about these 2 options and how to set them correctly. I am mimicking a eclipse multi project solution with modules and cross requirements since I discovered A: that the VSCode extension is based on eclipse and B: neither of them support "normal" single projects with multiple modules. But the nice menu to add in workspace dependencies to the other projects from eclipse is missing in vscode,

RedIODev avatar Oct 28 '22 17:10 RedIODev