I'm trying to import the GSON library into my processing java sketch. The editor I'm using is VS Code. I'm fairly new to how libraries work in Java, so I followed what many sites said. Here's what I did.
- First, I downloaded the GSON
.jar
file from this site. - Next, In my processing sketch within VS Code, I created folders called
libraries
andlibrary
, so that the file structure looked like this:/sketch/libraries/library
. - Then, I renamed the downloaded file from step 1 to
gson.jar
and put it in both thelibraries
thenlibrary
folder. - Finally, I imported the libraries at the top of my sketch like so:
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
However, I still get the library not found error:
No library found for com.google.gson No library found for com.google.gson Libraries must be installed in a folder named 'libraries' inside the sketchbook folder (see the Preferences window). main.pde:0:0:0:0: The package “com.google” does not exist. You might be missing a library.
What am I doing wrong? Am I missing a step?
Thanks for any help.