How to install libraries in java

I can’t find out how to install the libraries. Can someone help me I tried following WPILib but that did not work for me. And I am using VScode.

Are you using the WPILib Version of VSCode?

I don’t have my laptop with me right now but something like the following should be the process as far as I’m aware.
If you are using WPILibs version you can click on the WPILib logo in the top right and it should open the tasks list, there is an option that’s something like “Manage Vendor Dependencies”. After that you should get another list of either offline or online options, offline would be if you already have the files downloaded and just want to point to them or Online would be if you have the json url for the dependency.

I am using vscode with WPILib

WPILib has detailed documentation about installing new libraries at 3rd Party Libraries — FIRST Robotics Competition documentation

Find the online JSON link to the library you want to install, open WPILib Visual Studio Code 2023 and click the “W” icon at the very top right. Search “Manage Vendor Dependancies” and select the online install option, and paste the link to the file.

So then how do I get the Import ….; lines from that?

Once you have the library installed, if you try to reference something from that library, VSCode will give a little lightbulb next to your code. If you click on that, it should let you automatically import that library automatically.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.