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 & HelpPrograms › Processing Applications with 3rd Party Library
Page Index Toggle Pages: 1
Processing Applications with 3rd Party Library (Read 859 times)
Processing Applications with 3rd Party Library
Aug 20th, 2006, 12:14am
 
I have been playing around with the Flickr api combined with flickrj and I am having trouble making standalone applications.  Is there some issue I should be aware of (or perhaps a workaround) when dealing with distributed processing app with a third party java lib that isn't written purely for processing (can't be restructured or reorganized)?  I tried adding the .jar to the package contents and modifying the info.plist, but to no avail.  

Is there a way to include these libs inside the application bundle?

Any help would be appreciated.
Re: Processing Applications with 3rd Party Library
Reply #1 - Aug 26th, 2006, 12:40am
 
it should just be included when you export, so long as it's included in the "code" folder of your sketch when you're building the project. is that not working?
Re: Processing Applications with 3rd Party Library
Reply #2 - Aug 27th, 2006, 12:50am
 
Nope, cant seem to get it to work.  Right now, the .jar lives inside System/Library/Java/Extensions.  I assume it is an issue with classpath.  It shows up in the package contents for the application, but I still get a NoClassDefFoundError in the console.  Does just mean someone needs to make it a proper Processing library for it to work?

Just curious.
-robert
Re: Processing Applications with 3rd Party Library
Reply #3 - Aug 27th, 2006, 6:48pm
 
ah, get it out of /System/Library.. either use "add file to sketch" or drag the jar file into the p5 window, and that'll add it to the project. once it's there, it'll be included properly on export to app or applet.
Re: Processing Applications with 3rd Party Library
Reply #4 - Aug 27th, 2006, 8:28pm
 
I added the file like you suggested, and removed the copy from the /System/Library, and it works fine as an applet but does not work as an application.  Same error as before.
Re: Processing Applications with 3rd Party Library
Reply #5 - Aug 28th, 2006, 5:26am
 
Are you on a Mac?  Have you tried showing package contents and then adding the library jar to:

Resources/Java/

That's where 3rd party libraries show up for me. . .?

Dan
Re: Processing Applications with 3rd Party Library
Reply #6 - Aug 28th, 2006, 8:26am
 
Yeah, tried that.  Didn't work.  And adding the .jar like Fry suggested also puts it in the package contents, but it still gives me the NoClassDefFoundError error.

Re: Processing Applications with 3rd Party Library
Reply #7 - Sep 3rd, 2006, 4:46pm
 
Hmmm, well as a last resort you could build the project in Eclipse and use fatjar to make an executable jar. . .?

http://fjep.sourceforge.net/

Fun fun fun
Re: Processing Applications with 3rd Party Library
Reply #8 - Sep 4th, 2006, 4:05pm
 
you could also try creating a dummy library for it.. if you make a folder with the same name as the jar file, that should work as a library. so for instance, if the code is in potato.jar, you could make the following folder structure:

(sketchbook) -> potato -> library -> potato.jar

and then "add" it using import library. but other than that, what you describe should be working just fine, so perhaps you should archive the sketch for me and send it over so that i can look into it.
Page Index Toggle Pages: 1