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 › using java library
Page Index Toggle Pages: 1
using java library? (Read 2115 times)
using java library?
Aug 15th, 2005, 8:04pm
 
https://java-synaptics.dev.java.net/

this nice library allows to work directly with the synaptics touchpad, which is in most PC labtops these days.

is it possible to use it directly with processing? if yes: how is this done? any sample codes for importing and using external java libraries (except those already provided)?
Re: using java library?
Reply #1 - Sep 7th, 2005, 10:45am
 
Ciao Reto,

I found MoodPad and Pressure Graph on the Synaptics Pointing Device -- Accessories. I would like to replicate MoodPad in Processing but need mouseZ.  I have downloaded the java-synaptics library (*.dll) but don't know how to use Processing's Java Mode.  Is there a tutorial or examples available?

--Bill
Re: using java library?
Reply #2 - Sep 7th, 2005, 2:50pm
 
generally all you need to do is put any .dll or .jar files into the "code" folder of your sketch. in fact, if you use "add file" under the sketch menu and select the dll and jar files from the synaptics lib, you'll be able to use things there. anything found in the .jar files will be added to the "imports" for the sketch.

then you can adapt the examples to run as a PApplet instead of whatever else it might be.

the programming modes are discussed in the reference:
http://processing.org/reference/environment/index.html#Programming_modes
but "java mode" is more of a syntactic/structural thing than a true switch.

edit: forgot to add the libraries ref.. in general, to make this easier for others, you might want to adapt it to be a "library", which is discussed here:
http://dev.processing.org/libraries/
there's also more info about the code folder in there too.
Re: using java library?
Reply #3 - Feb 12th, 2006, 5:28pm
 
Thanks for your comments, Ben and Bill. As told - I put all the .jar files into the "code" folder.
However, I get a really weird error message when accessing methods related to this java library:

Semantic Error: The method "XXX" is not static, and cannot be accessed in this static context.

Do you know anything about this...?

Re: using java library?
Reply #4 - Apr 7th, 2006, 7:11am
 
Hi,

I get this too occasionally with classes I define:

Semantic Error: The method "XXX" is not static, and cannot be accessed in this static context.

how do you fix it?

thanks,

jrmy
Page Index Toggle Pages: 1