We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpIntegration › Where to put jars for inclusion in sketch
Page Index Toggle Pages: 1
Where to put jars for inclusion in sketch (Read 1233 times)
Where to put jars for inclusion in sketch
Jul 29th, 2005, 8:24pm
 
I would like to include a some java jar libraries for use as part of a sketch. Where should I put the jars such that they can be (1) used by my sketch in Processing and (2) automatically copied during export?

For (1), I see I can use "import" for an arbitrary java class. So, it seems to be an issue of getting the jars to be in the classpath somehow. I tried putting the jars in the sketch directory and I created a "lib" folder under it. No luck.

I'm new to processing, so apologies in advance if this was answered elsewhere (I looked).

Thanks,
--Sunil
Re: Where to put jars for inclusion in sketch
Reply #1 - Jul 30th, 2005, 12:33am
 
Create a directory called "data" in your sketch folder, and put the jar files in there, and they'll automatically be included in the compiled version.
Re: Where to put jars for inclusion in sketch
Reply #2 - Jul 30th, 2005, 6:50am
 
Just use "Add File..." under the sketch menu, and select the .jar file that you want. This has the effect of adding it to a folder called "code" that will be a subfolder of your sketch.

You don't need to do any imports, they'll be magically added so long as the .jar is in that code folder.

And the same is the case for native code (.dll, .so, or .jnilib) to go with a .jar file if that's what you're up to.
Page Index Toggle Pages: 1