Home > Back-end >  How do I link a native library to a Java project in VSCode?
How do I link a native library to a Java project in VSCode?

Time:11-05

I'm using LWJGL which has native libraries for my project to use. My question is how do I add native libraries to a Java project in VSCode? Also, when I created the project I selected the "no build tools" option if that's helpful.

CodePudding user response:

If you don't maven or gradle in your project, choosing no build tools is okay. Then turn to JAVA PROJECTS, find Referenced Libraries and click to add local jars:

enter image description here

[UPDATE]

To add ddl, add the following in launch.json:

"vmArgs": "-Djava.library.path="path/to/library"
  • Related