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 & HelpOther Libraries › Newbie library question
Page Index Toggle Pages: 1
Newbie library question (Read 1823 times)
Newbie library question
Nov 19th, 2008, 1:28pm
 
First off, respect to the creators of this fantastic piece of software. And forgive me if this isn't the right forum for a beginner question like this, please do point me in the right direction.

I'm trying to play around with http://www.aharef.info/static/htmlgraph/sourcecode.html - the first few lines are as follows:

import traer.physics.*;
import traer.animation.*;
import java.util.Iterator;
import java.util.ArrayList;
import java.util.HashMap;
import processing.net.*;
import org.htmlparser.*;
import org.htmlparser.util.*;
import org.htmlparser.filters.*;
import org.htmlparser.nodes.*;

I've found traer.physics and traer.animation and successfully unzipped them into /my documents/processing/libraries and now they appear on the sketch/import library menu when I run processing (in fact, they appear twice, first of all above a divider, then again in with the rest of the libraries, but that doesn't seem to be a problem). I've done exactly the same thing with htmlparser1_6 and it is definitely there in the sketchbook folder, but it doesn't show up in the menu and when I try to run the code, I get the messages "The package org.htmlparser does not exist. You might be missing a library" and "Starting with release 0149, libraries must be installed in a folder named 'libraries' inside the 'sketchbook' folder." Do I need to rename something, or have I got the wrong file altogether, or ... ?

Also, what about the java.util and processing.net.* libraries? Are they automatically included in the processing/java installations or do I have to download something else, and if so, what/where?

Thanks in advance for any help,

- guy




Re: Newbie library question
Reply #1 - Nov 19th, 2008, 1:46pm
 
Never mind, I just searched the site for htmlparser and found the answer (someone else had the same problem with the same file!). Just in case anyone has the same problem and finds this thread, you have to put the .jar files in a subdirectory called "code" in the sketch folder (not the sketchbook folder). You will also have to change the word framerate in the sketch code to frameRate (with upper case R).

- guy
Re: Newbie library question
Reply #2 - Jan 6th, 2009, 3:35am
 
this guy is completely right.

why would it say something completely wrong. and why is packaged code not set up this way with the jar files in a code folder?
Page Index Toggle Pages: 1