简体   繁体   中英

Java Compiling issue when first using vscode

I have been using vmware to log into the lab machines at my uni. I just started using vscode on my pc. I installed latest jdk 16.0 and i installed the java extension pack from vscode. But it still wont let me run or compile my program

I keep getting this error, thought it was an issue about the paths after a little bit of research so i made the java:home path to where jdk folder is in my c drive and i still get this error:

c:; cd 'c:\Users\Aaron Mark\Desktop\UNI\FinalAssignment'; & 'c:\Users\Aaron Mark\.vscode\extensions\vscjava.vscode-java-debug-0.34.0\scripts\launcher.bat' 'C:\Program Files\Java\jdk-16.0.1\bin\java.exe' '--enable-preview' '-XX:+ShowCodeDetailsInExceptionMessages' '-Dfile.encoding=UTF-8' '-cp' 'C:\Users\Aaron Mark\AppData\Roaming\Code\User\workspaceStorage\2bfa7b3e373492b1fc42e07c42d17320\redhat.java\jdt_ws\FinalAssignment_fe08a03d\bin' 'QuestionOnePartA

How do i fix this class not found error?

I think you point to the blue sentences displayed before the real output, actually they are not errors but execution scripts, which shows the necessary building and compiling commands to get the output:

在此处输入图像描述

If you don't want to see these scripts but pure output, create a launch.json and add "console": "externalTerminal", in configurations. Run without debugging(Ctrl+F5) can open a new external Terminal and no execution scripts shown: 在此处输入图像描述

This is not error. IDE is printing all the program being used for compiling and running the code.

'-cp': this is your classpath. You can add more external library using it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM