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
Library import (Read 4356 times)
Library import
Jan 31st, 2007, 4:15am
 
hey,

id like to access my touchpad in processing. doeas anybody know how to import that

https://java-synaptics.dev.java.net/

library (java) into processing and use it? thank you very much for your help.
Re: Library import
Reply #1 - Jan 31st, 2007, 8:50am
 
I don't know if it work but I could import it like this:
copy the java-synaptics-0.1.jar file in yourProcessingDir/libraries/synaptics/library and rename it to synaptics.jar. I think there is some trouble with the "-" in the name. In your sketch import the jar like this:
import net.kano.jsynaptics.*;
Re: Library import
Reply #2 - Jan 31st, 2007, 8:26pm
 
thank you for your fast help!!!

now i can access the classes i need. but if I do the following:

import net.kano.jsynaptics.*;
DeviceManager DM =  DeviceManager.getInstance();

I get this:

java.lang.UnsupportedClassVersionError: net/kano/jsynaptics/DeviceManager (Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)

what doeas that mean??? does it mean, processing and the libraries are incompatible? please dont tell me they are Smiley
...
thanks alot
Re: Library import
Reply #3 - Jan 31st, 2007, 10:23pm
 
I think that means that the library is Java 1.5, whilst processing uses 1.4.
Re: Library import
Reply #4 - Feb 1st, 2007, 1:48am
 
can i do anything about it? will processing use java 1.5 sometime? i need to use that library!
Re: Library import
Reply #5 - Feb 1st, 2007, 11:02am
 
You can replace the library processing uses with 1.5
Just rename the java folder int he procressing-0123 directory, and get a copy of the java-1.5 JRE, and put it in the place of the one that shipped with processing (folder must be called "java" not "jre-1.5-1_0_10" or whatever)
Re: Library import
Reply #6 - Apr 20th, 2007, 4:49am
 
JohnG, you totally freakin' rock.
That's the most useful thing I've ever heard.
Re: Library import / problem with native library
Reply #7 - Nov 17th, 2009, 1:52pm
 
Hi all,

I'm having a hard time trying to get the Synaptics Library to work.

No matter which way I import it, I get the same error:

2009-11-17 22:26:06 net.kano.jsynaptics.DeviceManager getInstance
SEVERE: Couldn't load java-synaptics native library
java.lang.UnsatisfiedLinkError: no jsynaptics in java.library.path
(...)


Having read this thread, an earlier one:
http: //processing.org/discourse/yabb2/num_1124.html
129086
and googling the subject, I still can't figure out what am I doing wrong.

I'm using:
Processing 1.0.9
Java 1.6.0_07-b06

I'd appreciate any help with this.
Thanks.

Re: Library import
Reply #8 - Nov 18th, 2009, 4:43am
 
Have you tried the advice in the second message? Just replacing yourProcessingDir by yourSketchbookDir.
Or put the jar in a 'code' folder in the sketch's folder, if you plan to use it in only one sketch.

Quote:
Processing 1.0.9
Java 1.6.0_07-b06
Nice info, but indicating which system you use is useful too... Smiley [EDIT] Well, looking at the link, I see the library is Windows only, so I am answered... But the advice is still generically sound. Smiley

Also show what is the path to your sketch and to your library.
Re: Library import
Reply #9 - Nov 18th, 2009, 12:31pm
 
PhiLho, thanks for the quick reply.

Yes, I tried all three options:
- main library folder
- libraries folder in the sketchbook
- code folder (through Add file...)
I've also changed the name of the file as eskimoblood suggested.

As for the paths, here's what I get after typing
println(System.getProperty("java.library.path"));

C:\psketches\test01\code;C:\processing\java\bin;.;C:\Windows\system32;C:\Windows
;C:\Program Files (x86)\PC Connectivity Solution;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;c:\Program Files (x86)\Common Files\Roxio Shared\DLLShared;c:\Program Files (x86)\Common Files\Roxio Shared\DLLShared;c:\Program Files (x86)\Common Files\Roxio Shared\9.0\DLLShared;C:\Program Files (x86)\QuickTime\QTSystem;C:\processing\java\bin;C:\processing\java\bin


One more thing:
The package contains two files:
- java-synaptics-0.1.jar
- java-synaptics-native-0.1.jar
Should I be doing something different with the latter?

Thanks again for your help.

ps. my OS is Vista 64bit

Re: Library import
Reply #10 - Nov 19th, 2009, 1:16am
 
Aha, the Vista + 64bit might be an issue. Well, I suppose you have a working driver outside of Processing, right?
But the native part of the library might not appreciate the 64bits. Or Vista. Or both... Smiley
I fear I have no experience yet with 64bit systems, so it is pure guess (driven by some base knowledge (lot of reading), though...  Cool).
Page Index Toggle Pages: 1