question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Default JDK not updated after changing java.home

See original GitHub issue

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

image

Configure java runtime - JDK 13

image


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%

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:19 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
snjezacommented, Feb 20, 2020

@hkuadithya You can also try to call Java: Clean the Java language server workspace

0reactions
hkuadithyacommented, Feb 24, 2020

@fbricon @snjeza Looks like this is an isolated case/issue which occurs under some weird set of circumstances. I couldn’t find any other issues resembling this under Open Issues. You folks could focus more time and resources on this if similar issues are opened in future.

I will close this issue for now. Thank you for investigating this. Please reopen if this warrants further investigation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Windows ignores JAVA_HOME: how to set JDK as default?
Two notes: first, it appears that the Java installer really did put java.exe in Windows\System32. This is astounding to me. Second, when you...
Read more >
Why is java -version returning a different version to the one ...
Start -> Control Panel -> System -> Advanced · Click on Environment Variables, under System Variables, find PATH , and click on it....
Read more >
Installing the JDK Software and Setting JAVA_HOME
To install the JDK software, do the following: ... Select the appropriate JDK version and click Download. The JDK software is installed on...
Read more >
How to Change Java Versions in Windows (Updated for JDK 18)
C:\Program Files (x86)\Common Files\Oracle\Java\javapath. Insert the following entry instead: %JAVA_HOME%\bin. The entry should then look like the following ( ...
Read more >
Update Java runtime settings on Windows
Verify that the latest Java Runtime version is enabled by checking the Enabled box. Click OK to save settings; Click OK in Java...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found