Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java won't work #193026

Closed
hopner opened this issue Sep 13, 2023 · 5 comments
Closed

Java won't work #193026

hopner opened this issue Sep 13, 2023 · 5 comments
Assignees

Comments

@hopner
Copy link

hopner commented Sep 13, 2023

Type: Bug

After restarting vscode on my mac today, all of my maven projects are unable to compile and run.

VS Code version: Code 1.82.0 (8b617bd, 2023-09-06T22:08:29.670Z)
OS version: Darwin arm64 22.4.0
Modes:

System Info
Item Value
CPUs Apple M1 (8 x 24)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) 3, 4, 3
Memory (System) 8.00GB (0.08GB free)
Process Argv --crash-reporter-id e5c99e0e-6ff2-48dd-8fd0-40a8b35b92ff
Screen Reader no
VM 0%
Extensions (45)
Extension Author (truncated) Version
better-comments aar 3.0.2
composer-php-vscode DEV 1.38.13826
phptools-vscode DEV 1.38.13826
profiler-php-vscode DEV 1.38.13826
githistory don 0.6.20
gitlens eam 14.3.0
copilot Git 1.111.404
copilot-chat Git 0.7.2023090101
todo-tree Gru 0.0.226
haskell has 2.4.1
output-colorizer IBM 0.1.2
latex-workshop Jam 9.13.4
vscode-peacock joh 4.2.2
language-haskell jus 3.6.0
vscode-colorize kam 0.11.1
vscode-latex mat 1.2.0
python ms- 2023.16.0
vscode-pylance ms- 2023.9.10
jupyter ms- 2023.8.1002501831
jupyter-keymap ms- 1.1.2
jupyter-renderers ms- 1.0.17
vscode-jupyter-cell-tags ms- 0.1.8
vscode-jupyter-slideshow ms- 0.1.5
cmake-tools ms- 1.15.31
cpptools ms- 1.17.5
cpptools-extension-pack ms- 1.3.0
latex-formatter nic 1.0.5
polacode pnp 0.3.4
java red 1.22.0
LiveServer rit 5.7.9
markdown-preview-enhanced shd 0.7.3
code-spell-checker str 3.0.1
code-spell-checker-norwegian-bokmal str 0.2.0
latex-utilities tec 0.4.10
cmake twx 0.0.17
intellicode-api-usage-examples Vis 0.2.8
vscodeintellicode Vis 1.2.30
vscode-java-debug vsc 0.54.0
vscode-java-dependency vsc 0.23.1
vscode-java-pack vsc 0.25.12
vscode-java-test vsc 0.39.1
vscode-maven vsc 0.42.0
vscode-icons vsc 12.5.0
gitblame wad 10.5.0
vscode-import-cost wix 3.3.0

(1 theme extensions excluded)

A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492:30256859
vslsvsres303:30308271
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263cf:30335440
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
pythonvs932:30410667
py29gd2263cf:30792227
vsclangdc:30486549
c4g48928:30535728
dsvsc012cf:30540253
pynewext54:30695312
azure-dev_surveyone:30548225
vscccc:30803845
2e4cg342:30602488
89544117:30613380
2i9eh265:30646982
showlangstatbar:30737416
962ge761:30835153
03d35959:30757346
pythonfmttext:30731395
fixshowwlkth:30771522
showindicator:30805244
pythongtdpath:30769146
i26e3531:30792625
pythonnosmt12:30797651
pythonidxptcf:30805731
pythonnoceb:30805159
dsvsc013:30795093
dsvsc014:30804076
diffeditorv2:30821572
dsvsc015cf:30829746

@vscodenpa
Copy link

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.82.1. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

@hopner
Copy link
Author

hopner commented Sep 13, 2023

Issue remains after updating:

Error: Unable to initialize main class
Caused by: java.lang.NoClassDefFoundError: List

@flosardo
Copy link

flosardo commented Sep 13, 2023

Same issue with the latest VS Code version 1.82.
Update 13 sept: A possible fix could be adding JAVA_HOME to your path(if it's not already there) and restart VS Code as suggested in the following stackoverflow answer. It worked for me.
https://stackoverflow.com/questions/77092008/why-is-my-build-path-suddenly-incomplete-for-my-java-project-in-visual-studio-co?noredirect=1&lq=1
However, it still remains a mystery why all of a sudden this happened

@flosardo flosardo mentioned this issue Sep 13, 2023
@starball5
Copy link

See redhat-developer/vscode-java#3287.

Related on Stack Overflow: Why is my build path suddenly incomplete for my java project in VS Code?, where I have written up an answer post.

@roblourens
Copy link
Member

Please file this on the Java extension repo, thanks

@github-actions github-actions bot locked and limited conversation to collaborators Oct 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants