vscode-java: Default JDK not updated after changing java.home
Issue Type: Bug
VSCode Java extension seems to raise error while using var
data type (type inference for local variables was introduced way back with Java 10). Running the project also seems to fail while using var
datatype.
There’s absolutely no problem with my Java environment. Compiling and running the same Java file using javac
and java
succeeds in command line. This works fine with IntelliJ IDEA as well. Please check the screenshots of the error and Configure java runtime.
Is there some setting or configuration I need to change?
Java environment details:
java 13.0.2 2020-01-14
Java(TM) SE Runtime Environment (build 13.0.2+8)
Java HotSpot(TM) 64-Bit Server VM (build 13.0.2+8, mixed mode, sharing)
Error
Configure java runtime - JDK 13
Extension version: 0.8.1 VS Code version: Code 1.42.1 (c47d83b293181d9be64f27ff093689e8e7aed054, 2020-02-11T14:45:59.656Z) OS version: Windows_NT x64 10.0.18362
System Info
Item | Value |
---|---|
CPUs | Intel® Core™ i7-7500U CPU @ 2.70GHz (4 x 2904) |
GPU Status | 2d_canvas: enabled flash_3d: enabled flash_stage3d: enabled flash_stage3d_baseline: enabled gpu_compositing: enabled metal: disabled_off multiple_raster_threads: enabled_on oop_rasterization: disabled_off protected_video_decode: enabled rasterization: enabled skia_renderer: disabled_off surface_control: disabled_off surface_synchronization: enabled_on video_decode: enabled viz_display_compositor: enabled_on viz_hit_test_surface_layer: disabled_off webgl: enabled webgl2: enabled |
Load (avg) | undefined |
Memory (System) | 15.91GB (8.79GB free) |
Process Argv | |
Screen Reader | no |
VM | 0% |
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 19 (3 by maintainers)
@hkuadithya You can also try to call Java: Clean the Java language server workspace