I am teaching classes and recently switched from eclipse to vscode-java as the editor/IDE of choice in those classes. However, due to the recent JDK chaos (multiple OpenJDK distros, quick releases, LTS, non-LTS) and a few vscode quirks it has gotten fairly complicated to cleanly set up all my students’ vscodes.
Here are some questions and suggestions on how to improve the first-time experience:
- JDK handling: it would be quite neat if the extension downloads a ‘private copy’ of a JDK on first start (bundling it would bloat the download size too much I think) so that jdt.ls always has a private copy of it and doesn’t need to rely on java.home
- Furthermore it would be great to enable relative Paths for settings like java.home and java.configuration.runtimes so that I could create a vscode workspace with a local JDK for my students
- Launch the extension when opening a workspace containing java projects and not on first-open of a *.java file: I know it may be beneficial in some situations to lazy load the extension but for my use case it would be great to be able to autoload it (preferably with a *.vscode-workspace level setting). Right now my problem is that all java commands in the command palette are available but don’t work unless a java file has been opened and jot.ls has started
- The command “Java: Clean the java language workspace” must be executed way too often and the detection when to do it isn’t good enough just yet: If you change settings directly in settings.json, depending if the server has been started or not, you won’t get a notification to do it and the language server will be in some sort of undefined state, even if you close and restart vscode. My quick fix suggestion would be to enhance the detection of changes (basically if any java.* changed suggest to clean the workspace)
- Additionally, sometimes you’ll get the message that a java file is out-of-project and only syntax errors are reported while it is clearly inside a maven project (jdt.ls must have somewhat corrupted the workspace), is it possible to add a detection that if there’s a maven/gradle project present to also suggest to clean the workspace instead of silently failing?
Keep up the good work! If you need further info on those subjects please let me know.
Environment
- Operating System: any
- JDK version: any
- Visual Studio Code version: 1.50.1
- Java extension version: 0.69.0
I am teaching classes and recently switched from eclipse to vscode-java as the editor/IDE of choice in those classes. However, due to the recent JDK chaos (multiple OpenJDK distros, quick releases, LTS, non-LTS) and a few vscode quirks it has gotten fairly complicated to cleanly set up all my students’ vscodes.
Here are some questions and suggestions on how to improve the first-time experience:
Keep up the good work! If you need further info on those subjects please let me know.
Environment