microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.38k stars 28.94k forks source link

Could not find/load main class error #230554

Closed MyCatProgram closed 5 days ago

MyCatProgram commented 1 week ago

We have written the needed data into your clipboard because it was too large to send. Please paste. Type: Performance Issue

For some reason, none of my files are running. It keeps saying "Error: Could not find or load main class" when they were just working a few days ago. This has been going on for awhile. I never made any changes to the program so this is very random. I have no idea how to fix this nor why this is happening...

VS Code version: Code 1.94.0 (d78a74bcdfad14d5d3b1b782f87255d802b57511, 2024-10-02T13:08:12.626Z) OS version: Windows_NT x64 10.0.22631 Modes:

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i5-1035G4 CPU @ 1.10GHz (8 x 1498)| |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
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off| |Load (avg)|undefined| |Memory (System)|7.60GB (0.30GB free)| |Process Argv|--crash-reporter-id 936d7f91-1cda-46be-afbf-29c4a8bdfb28| |Screen Reader|no| |VM|0%|
Process Info ``` CPU % Mem MB PID Process 1 112 1744 code main 0 124 284 extensionHost [1] 0 589 2392 c:\Users\jiona\.vscode\extensions\redhat.java-1.35.1-win32-x64\jre\17.0.12-win32-x86_64\bin\java --add-modules=ALL-SYSTEM --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/sun.nio.fs=ALL-UNNAMED -Declipse.application=org.eclipse.jdt.ls.core.id1 -Dosgi.bundles.defaultStartLevel=4 -Declipse.product=org.eclipse.jdt.ls.core.product -Djava.import.generatesMetadataFilesAtProjectRoot=false -DDetectVMInstallationsJob.disabled=true -Dfile.encoding=utf8 -XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx1G -Xms100m -Xlog:disable -javaagent:c:\Users\jiona\.vscode\extensions\redhat.java-1.35.1-win32-x64\lombok\lombok-1.18.33.jar -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=c:\Users\jiona\AppData\Roaming\Code\User\workspaceStorage\57ad62fca19395bf18b9e535130d2c49\redhat.java -Daether.dependencyCollector.impl=bf -jar c:\Users\jiona\.vscode\extensions\redhat.java-1.35.1-win32-x64\server\plugins\org.eclipse.equinox.launcher_1.6.900.v20240613-2009.jar -configuration c:\Users\jiona\AppData\Roaming\Code\User\globalStorage\redhat.java\1.35.1\config_win -data c:\Users\jiona\AppData\Roaming\Code\User\workspaceStorage\57ad62fca19395bf18b9e535130d2c49\redhat.java\jdt_ws --pipe=\\.\pipe\lsp-262b1484da8cdb0db33b0f598a99baf3-sock 0 30 16916 c:\Users\jiona\.vscode\extensions\redhat.java-1.35.1-win32-x64\jre\17.0.12-win32-x86_64\bin\jcmd 2392 VM.uptime 0 10 16960 C:\WINDOWS\system32\conhost.exe 0x4 0 31 3564 crashpad-handler 0 79 5476 ptyHost 0 6 9036 conpty-agent 0 6 10116 conpty-agent 0 65 11948 C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -noexit -command "try { . \"c:\Users\jiona\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\contrib\terminal\common\scripts\shellIntegration.ps1\" } catch {}" 0 63 14404 C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -noexit -command "try { . \"c:\Users\jiona\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\contrib\terminal\common\scripts\shellIntegration.ps1\" } catch {}" 2 201 5564 window [1] (Initials.java - Programming2024 - Visual Studio Code) 0 92 8588 fileWatcher [1] 1 167 12328 gpu-process 0 79 14476 shared-process 0 43 15324 utility-network-service ```
Workspace Info ``` | Window (Initials.java - Programming2024 - Visual Studio Code) | Folder (Programming2024): 19 files | File types: java(13) json(1) jar(1) | Conf files: settings.json(1); ```
Extensions (10) Extension|Author (truncated)|Version ---|---|--- java|red|1.35.1 intellicode-api-usage-examples|Vis|0.2.8 vscodeintellicode|Vis|1.3.1 vscode-gradle|vsc|3.16.4 vscode-java-debug|vsc|0.58.0 vscode-java-dependency|vsc|0.24.0 vscode-java-pack|vsc|0.29.0 vscode-java-test|vsc|0.42.0 vscode-maven|vsc|0.44.0 ooxml-viewer|yue|2.0.1
A/B Experiments ``` vsliv368:30146709 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscod805:30301674 binariesv615:30325510 vsaa593cf:30376535 py29gd2263:31024239 c4g48928:30535728 azure-dev_surveyone:30548225 962ge761:30959799 pythongtdpath:30769146 welcomedialog:30910333 pythonnoceb:30805159 asynctok:30898717 pythonmypyd1:30879173 2e7ec940:31000449 pythontbext0:30879054 accentitlementsc:30995553 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 dsvsc020:30976470 pythonait:31006305 dsvsc021:30996838 945dj816:31013170 a69g1124:31058053 dvdeprecation:31068756 dwnewjupyter:31046869 2f103344:31071589 impr_priority:31102340 nativerepl2:31139839 refactort:31108082 pythonrstrctxt:31112756 flighttreat:31134774 wkspc-onlycs-t:31132770 wkspc-ranged-t:31151552 cf971741:31144450 defaultse:31146405 notype1cf:31151524 cc771715:31146322 ```
roblourens commented 5 days ago

This sounds like an issue with your code or configuration, but you can open an issue on the Java extension is needed