DonJayamanne / javaVSCode

Extension for java development on VSCode (deprecated)
https://marketplace.visualstudio.com/items?itemName=donjayamanne.javaDebugger
MIT License
43 stars 29 forks source link

wrong generated options in launch.json #37

Closed ghost closed 7 years ago

ghost commented 7 years ago

For Linux it generates:

      "options": [
        "-classpath",
        "\"${fileDirname};.\""
      ]

But must:

      "options": [
        "-classpath",
        "${fileDirname}:."
      ]

Linux doesn't use semicolons in this case and it doesn't need additional double quotes around $fileDirname.

This mismatch creates Could not find or load main class SomeClass error.

rianadon commented 7 years ago

The double quotes also cause issues in Windows and removing them makes the classpath valid.

faustinoaq commented 7 years ago

Fixed via commit

This change will ship in next release

rianadon commented 7 years ago

Thanks @faustinoaq! I may be incorrect but even with the commit wouldn't semicolons still be present in the default launch configuration under Linux?

If they are then the launch configuration should probably be dynamically generated based on the OS, or the classpath instead specified as an array. If you'd prefer I could submit a PR for either.

faustinoaq commented 7 years ago

Yes, a classpath array would be useful here, see: Java Linter implementation A PR is welcome :smile:

rianadon commented 7 years ago

Thank you for the link. I'll work on a PR and use this issue for any questions I may have :smiley:.