How to fix java.lang.UnsupportedClassVersionError: test (class file version 52.65535) was compiled with preview features that are unsupported?

后端 未结 2 720
温柔的废话
温柔的废话 2020-12-11 05:26

I recieved this error when I trying to debug a java program with vscode:

java.lang.UnsupportedClassVersionError: 
test (class file version 52.65535) was comp         


        
2条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-11 05:40

    In launch.json file, add "vmArgs": "--enable-preview" to your debug configuration.

    {
       ...
       "vmArgs": "--enable-preview"
    }
    

提交回复
热议问题