Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

Using a (non P5) library that doesn't have a .jar file ?

$
0
0

I've been using Eclipse for a bit, but the ease of use and new features in the P3 IDE have made me come back to it.

I'm having some trouble installing an external library though. This is the one: https://github.com/google/gson

I looked around and found out that others got ext libraries to work, by adding the .jar file to the sketch.

This file was nowhere to be found in the zip however, so I tried making it myself. Went into eclipse, made a new java project and did import > archive file. Added gson-master.zip. Then did export > java > jar file.

After adding the file to my sketch, I put import com.google.gson.Gson; at the top. But it gives me "The package "com.google" does not exist. You might be missing a library." error.

Tried adding it to my library folder, made a folder "gson" with a folder "library" inside and put the .jar in there. It shows up in the Sketch > Import library menu now, but when I click it it doesn't add a line. I clearly should read up on how libraries function within processing...

Any idea on how I could get this to work?


Viewing all articles
Browse latest Browse all 2896

Trending Articles