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.
Page Index Toggle Pages: 1
General Library Help (Read 787 times)
General Library Help
Oct 31st, 2008, 11:51pm
 
I have a few questions regarding creating a library.

I have made a firmware for Arduino for reliable fast serial communication and control.

I have a library written in Ruby, which I have translated over to Java, I don't know  Java but I tried. And I am using the library template for Eclipse.

My Questions.
1. If I want my library to import processing.serial* so that I can use the serial library do I have to do anything special besides importing into my .java source?

2. When I try to compile and an example library with Eclipse  I get the error:
Usage: PApplet <appletname>
For additional options, see the javadoc for PApplet

Even if i'm not using PApplet.

Any help would be very much appreciated.
Re: General Library Help
Reply #1 - Nov 2nd, 2008, 5:27am
 
hi justin,
(1) processing.serial is using PApplet since it is referencing to a PApplet object, hence the compiler somehow needs to know where this PApplet object is coming from. in order to use the processing.serial library you would also need to import processing.core in your code, even though you are not using processing.core directly. (if you are using the library template, make sure you add both, core.jar and processing.serial to your classpath)
(2) where do you get this error in eclipse or inside processing

Page Index Toggle Pages: 1