vscode+java+windows: I want to import and use org.apache.logging.log4j.Logger without Maven

前端 未结 1 628
挽巷
挽巷 2021-01-24 13:33

Using only vscode with java extensions added, and native Java 8 without any additional libraries or extensions, I\'d like to use log4j.

I have downloaded the various .ja

相关标签:
1条回答
  • 2021-01-24 14:08

    1.make sure you hava create a folder named lib and add your .jar file into it

    2.Configure paths in the .classpath like:

    <classpathentry kind="lib" path="lib/log4j-1.2-api-2.11.2.jar"/>
    <classpathentry kind="lib" path="lib/log4j-api-2.11.2.jar"/>
    <classpathentry kind="lib" path="lib/log4j-core-2.11.2.jar"/>
    

    3.if it still thow error,Clean the workspace directory:

    the VS Code user workspace storage area can be found under these locations :

    • Windows : %APPDATA%\Code[ - Variant]\User\workspaceStorage\
    • MacOS : $HOME/Library/Application Support/Code[ - Variant]/User/workspaceStorage/
    • Linux : $HOME/.config/Code[ - Variant]/User/workspaceStorage/

    could refer to add jar

    0 讨论(0)
提交回复
热议问题