Skip to content
Advertisement

How do I link a native library to a Java project in VSCode?

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.

Advertisement

Answer

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"
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement