Visual Studio Code, Java Extension, howto add jar to classpath

后端 未结 8 904
攒了一身酷
攒了一身酷 2020-11-29 03:20

In Eclipse, I add a jar library using

project -> build path ->configure build path

What is the equivalent in VisualStudioCode? I had a look into launch.json

8条回答
  •  情书的邮戳
    2020-11-29 04:06

    import external jar file into java project,now in vscode 1.48.2 is work well,follow the reference below: https://code.visualstudio.com/docs/java/java-project#_working-with-jar-files

    what I want to said is, if your external jar path has Chinese characters,even if put the jar files into lib directory under project root directory and the project path has chinese characters,when you debug or run,it will report an error message like this:

    Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringUtils
    

    I had not idea whether this problem appear in other language characters.be careful.

提交回复
热议问题