![]() |
huruixd (Apr 16, 2009)
I have wacom bamboo tablet working undering Ubuntu. I am working on a project which collects raw data from the wacom driver. And I found that the JTablet provided by cellosoft very helpful. So I downloaded jtablet_20090101-1_i386.deb and installed it. The testing applets works fine.
But when it comes to a very little program:(I wrote it in Eclipse. I imported jtablet.jar by Build Path>Configure build path>add external JARs) =================================== import cello.tablet.*; public class Test { public static void main(String [] args) { try { JTablet jtablet = new JTablet(); System.out.println("abs"); } catch(JTabletException jte) { System.err.println("Could not load JTablet!("+jte.toString()+")"); } } } Then I compile it. It says: Exception in thread "main" java.lang.UnsatisfiedLinkError: libjtablet: libjtablet.so: cannot open shared object file: No such file or directory at java.lang.Runtime._load(libgcj.so.90) at java.lang.Runtime.loadLibrary(libgcj.so.90) at java.lang.System.loadLibrary(libgcj.so.90) at cello.tablet.JTabletLoadNative$1.run(Unknown Source) at java.security.AccessController.doPrivileged(libgcj.so.90) at cello.tablet.JTabletLoadNative.loadNative(Unknown Source) at cello.tablet.JTablet.<clinit>(Unknown Source) at java.lang.Class.initializeClass(libgcj.so.90) at testing.Test.main(Test.java:11)/usr/java/packages/lib/i386 I believe the error caused by that I didn't set up the environment path (i.e. LD_LIBRARY_PATH in Linux). So I located the libjtablet.so file which is at /usr/java/packages/lib/i386 and do: # export LD_LIBRARY_PATH= /usr/java/packages/lib/i386 . Then I compile it again. The error happens again. So does anyone could help me go through this? Or show me a little sample, say: a little main function which only displays position X on the console. Thank you. |
||||
![]() |
davincipoppalag (Apr 17, 2009)
Marcello will be interested in this if he sees it.. You might want to send him a memo here and ask him to look at this.
|
|||
jigpu (Apr 18, 2009)
Your code compiles and runs correctly for me with Sun Java 1.6 in Ubuntu Intrepid.
From the looks of it, you're using GNU Java (aka: CGJ) to compile and run, correct? I've not tested this scenario, and it could be the source of your problem. If you've also got Sun Java installed on your system, it'd explain why the applets work but not your own code. JTablet installs itself as a Java extension, which means that its JAR and library are placed in a directory set aside for automatic loading by the VM (as an aside, because of this you shouldn't need to notify Eclipse of JTablet.jar when things are working properly. Java automatically adds extensions to the classpath). Prior to Java 1.6, each version of Java had its own extension directory. In order for JTablet to work with any particular version, it needed to be installed into that version's extension directory. This obviously caused breakage whenever somebody upgraded Java :D I'm not sure if the Windows version makes use of the new version-independent extension directory defined by Java 1.6, but the Linux port does. What this means is that the Linux port of JTablet won't work with any version of Sun Java prior to 1.6 unless you manually copy the contents of /usr/java/packages into the appropriate JRE root directory. If GCJ doesn't make use of this version-independent directory, it'd explain your problems as well. Since I can't seem to get GCJ to run for me, please compile the following program in Eclipse. Have Eclipse set "java.ext.dirs" as the argument, and post back the results. "/usr/java/packages/lib/ext" will need to be in the output for JTablet to work without modification. ~~~~~~~~~~~~~~~~~ public class PropPrinter { public static void main(String args[]) { for (String prop : args) System.out.println(prop + "\t" + System.getProperty(prop)); } } ~~~~~~~~~~~~~~~~~ |
||||
| ||||
2draw.net © 2002-2025 2draw.net team/Cellosoft - copyright details - 0.12sec (sql: 11q/0.06sec) |