• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

Attn: Wacom Tablet Users

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.
why do i get the feeling this will be used in schools sometimg in the future? Digital Notebooks anyone?

nice work, even though i dont understand a word of it... never got into programing, more of a hardware person. i will will be keeps track of yalls work, GL! :thup:
 
Not Compiling

Hey, Ubuntu 7.10 fresh install, java works, all the required libraries are installed, yet I get a long string of errors resulting from the following piece of code trying to be made:

Code:
g++ -g3 -dDEBUG -Wall -D REENTRANT -D GNU_SOURCE -D VERBOSE -I/include -I/include/linux -fPIC -c cello_tablet_JTablet.cpp -o cello_tablet_JTablet.o
cc1plus: warning: unrecognized gcc debugging option: U
cello_tablet_JTablet.cpp:28:17: error: jni.h: No such file or directory
cello_tablet_JTablet.cpp:29:20: error: jni_md.h: No such file or directory
cello_tablet_JTablet.h:15: error: ‘JNIEXPORT’ does not name a type
cello_tablet_JTablet.h:23: error: ‘JNIEXPORT’ does not name a type
cello_tablet_JTablet.h:31: error: expected constructor, destructor, or type conversion before ‘void’
cello_tablet_JTablet.h:39: error: expected constructor, destructor, or type conversion before ‘void’
cello_tablet_JTablet.h:47: error: ‘JNIEXPORT’ does not name a type

Not sure if I'm just missing something, or if it just doesn't work under Ubuntu yet. I'm REALLY looking forward to this working soon
 
Hey JigPu,

I am getting a lot of warnings when I compile the latest version, here it is after I run make:

Code:
charlie@charlie-laptop:~/Desktop/jtablet-sdk-v0.9.5_linux/c++src$ make
g++ -g3 -dDEBUG -Wall -D REENTRANT -D GNU_SOURCE -D VERBOSE -I/usr/lib/jvm/java-6-sun-1.6.0.03/include -I/usr/lib/jvm/java-6-sun-1.6.0.03/include/linux -fPIC -c cello_tablet_JTablet.cpp -o cello_tablet_JTablet.o
cc1plus: warning: unrecognized gcc debugging option: U
cello_tablet_JTablet.cpp: In function ‘void Java_cello_tablet_JTablet_closeTablet(JNIEnv*, _jclass*)’:
cello_tablet_JTablet.cpp:83: warning: statement has no effect
cello_tablet_JTablet.cpp:85: warning: statement has no effect
g++ -g3 -dDEBUG -Wall -D REENTRANT -D GNU_SOURCE -D VERBOSE -I/usr/lib/jvm/java-6-sun-1.6.0.03/include -I/usr/lib/jvm/java-6-sun-1.6.0.03/include/linux -fPIC -c JTablet.cpp -o JTablet.o
cc1plus: warning: unrecognized gcc debugging option: U
JTablet.cpp: In function ‘_jclass* JTablet_getCursorClass(JNIEnv*)’:
JTablet.cpp:68: warning: statement has no effect
JTablet.cpp:74: warning: statement has no effect
JTablet.cpp:79: warning: statement has no effect
JTablet.cpp:83: warning: statement has no effect
JTablet.cpp:87: warning: statement has no effect
JTablet.cpp:91: warning: statement has no effect
JTablet.cpp: In function ‘_jobject* JTablet_makeCursor(JNIEnv*, jint, jint)’:
JTablet.cpp:152: warning: statement has no effect
JTablet.cpp:157: warning: statement has no effect
JTablet.cpp:164: warning: statement has no effect
JTablet.cpp:172: warning: statement has no effect
JTablet.cpp:179: warning: statement has no effect
JTablet.cpp:183: warning: statement has no effect
JTablet.cpp:190: warning: statement has no effect
JTablet.cpp:194: warning: statement has no effect
JTablet.cpp: In function ‘void JTablet_deleteCursors(JNIEnv*)’:
JTablet.cpp:214: warning: left-hand operand of comma has no effect
g++ -g3 -dDEBUG -Wall -D REENTRANT -D GNU_SOURCE -D VERBOSE -I/usr/lib/jvm/java-6-sun-1.6.0.03/include -I/usr/lib/jvm/java-6-sun-1.6.0.03/include/linux -fPIC -c xtabletaccess.cpp -o xtabletaccess.o
cc1plus: warning: unrecognized gcc debugging option: U
xtablet.cpp: In constructor ‘TabletDevice::TabletDevice(XDeviceInfo*, Display*)’:
xtablet.cpp:94: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘XID’
xtablet.cpp:94: warning: format ‘%d’ expects type ‘int’, but argument 4 has type ‘Atom’
xtablet.cpp: In constructor ‘WacomDevice::WacomDevice(XDeviceInfo*, Display*)’:
xtablet.cpp:250: warning: comparison between signed and unsigned integer expressions
xtablet.cpp:251: warning: comparison between signed and unsigned integer expressions
xtablet.cpp:252: warning: comparison between signed and unsigned integer expressions
xtablet.cpp:253: warning: comparison between signed and unsigned integer expressions
xtablet.cpp:258: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘XID’
xtablet.cpp:258: warning: format ‘%d’ expects type ‘int’, but argument 4 has type ‘Atom’
xtablet.cpp:314: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘XID’
xtablet.cpp: In member function ‘virtual bool WacomDevice::Initiated(XEvent*)’:
xtablet.cpp:685: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘XID’
xtablet.cpp:698: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘XID’
xtablet.cpp:711: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘XID’
xtablet.cpp:724: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘XID’
xtablet.cpp:737: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘XID’
xtablet.cpp:750: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘XID’
xtablet.cpp:763: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘XID’
xtablet.cpp:776: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘XID’
xtablet.cpp:787: warning: format ‘%d’ expects type ‘int’, but argument 4 has type ‘XID’
xtabletaccess.cpp: In function ‘bool InitializeTablet(bool)’:
xtabletaccess.cpp:129: warning: format ‘%d’ expects type ‘int’, but argument 5 has type ‘Atom’
xtabletaccess.cpp:129: warning: format ‘%d’ expects type ‘int’, but argument 6 has type ‘XID’
gcc *.o -shared -o libjtablet.so -L/usr/X11R6/lib -lX11 -lXi -L/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/ -lstdc++

I haven't got a chance to read over the code, I think its because things are not being casted, so no big deal.

also when I attempt to run the test applet, I get the following:

Code:
charlie@charlie-laptop:~/Desktop/jtablet-sdk-v0.9.5_linux/c++src$ make test_applet2
cd ../examples && appletviewer JTablet-test2.html
using java 2! (v1.4+!)
Closing all known tablets.
Tablet(s) closed.
Connected to X server.
Enumerating devices...
Found: deviceInfo[0].name = Synaptics Touchpad, type = 86, id = 0
Constructing new TabletDevice (id = 0, type = 86)
Found: deviceInfo[1].name = eraser, type = 115, id = 1
Constructing new TabletDevice (id = 1, type = 115)
Found: deviceInfo[2].name = cursor, type = 116, id = 2
Constructing new TabletDevice (id = 2, type = 116)
Found: deviceInfo[3].name = stylus, type = 117, id = 3
Constructing new TabletDevice (id = 3, type = 117)
Found: deviceInfo[4].name = Configured Mouse, type = 86, id = 4
Constructing new TabletDevice (id = 4, type = 86)
Found: deviceInfo[5].name = Generic Keyboard, type = 85, id = 5
Constructing new TabletDevice (id = 5, type = 85)
No tablet(s) detected.
cello.tablet.JTabletException: Could not initialize tablet.
        at cello.tablet.JTablet.initializeTablet(Native Method)
        at cello.tablet.JTablet.<init>(JTablet.java:84)
        at cello.tablet.JTablet.<init>(JTablet.java:72)
        at cello.tablettest.JTablettest2.init(Unknown Source)
        at sun.applet.AppletPanel.run(AppletPanel.java:419)
        at java.lang.Thread.run(Thread.java:619)
java.lang.NullPointerException
        at cello.tablettest.JTablettest2.init(Unknown Source)
        at sun.applet.AppletPanel.run(AppletPanel.java:419)
        at java.lang.Thread.run(Thread.java:619)
Closing all known tablets.
Tablet(s) closed.

EDIT: Another thing to note, is that it disconnected my tablet from the X system; before I ran your program, it was working now its not until I restart my machine.

I have a Wacom Intous2 9x12 tablet; I have been looking for something like this for a while.

---------------

To Marupa: I am on Ubuntu 7.10 too; the problem is that the $JDK_HOME environment variable is not set for some reason. To figure out where the home directory is, you quite simply type the following into the console:

Code:
$ > locate jni.h
/usr/lib/jvm/java-6-sun-1.6.0.03/include/jni.h

In this case, the $JDK_HOME directory is suppose to be "/usr/lib/jvm/java-6-sun-1.6.0.03/" Now to fix this you can go and edit your environment variables and add $JDK_HOME manually using the export command. for example:

Code:
$ >export JDK_HOME\=/usr/lib/jvm/java-6-sun-1.6.0.03

you also have to make sure that you have the X dev package installed
 
Last edited:
Sorry to those who tried this out in the last month -- I took a bit of an unannounced break from development durring dead/finals week, and forgot to pick it back up durring christmas break...

I've incorporated a few changes based on JPen from nicarran which will hopefully make things work for more people. Rather than using device IDs (which apparently change from system to system), I'm now comparing device name strings. Also, I've adapted the event registration code from JPen since it was working for henke_a. Hopefully these two changes make the code work on a much wider range of systems. Revised download will be in the first post in a few seconds...

~~~~~~~~~~~~~~

CharlieLavers, I'm not sure why your tablet would be disconnected like that (mine has never done that), though my best guess is that I'm not properly cleaning up my devices after using them... I'm not getting exclusive access as far as I know, so something odd has to be going on to cause that behavior.

JigPu
 
New release is out for testing, and I know of at least one Ubuntu box that it runs on.... Mine! :) I've been developing on my Gentoo laptop, but with the number of Ubuntu users having problems, I finally installed it on a spare partition on my desktop.

Let me say that it was quite insightful to have a broken version sitting in front of me to do testing with. The problem was the result of a huge bug in the old code -- one so big I'm amazed it ever worked on my laptop! I was mis-reading the X11 API, and it only worked on my machine due to pure luck. This latest version now has the event code rewritten to properly find events, and should fix all those nasty problems I've been having. (at least I hope it does...)

I've also done a little bit of tweaking the code to remove excess. For example, I reimplemented the TabletManager so that it uses STL linked lists instead of my own home-grown list.


~~~~~~~~~~~~
Output from my Wacom Graphire4 under Ubuntu Gutsy
Code:
jason@Goddess:~/Desktop/jtablet-sdk-v0.9.5_linux/c++src$ sudo make test_applet2
cd ../examples && appletviewer JTablet-test2.html
using java 2! (v1.4+!)
Closing all known tablets.
Tablet(s) closed.
Connected to X server.
Enumerating devices...
Found: deviceInfo[0].name = eraser, type = 160, id = 0
Constructing new TabletDevice (id = 0, type = 160)
Constructing new WacomDevice (id = 0, type = 160)
   * Class 1 is a KeyClass. There are 5 keys from 8 to 12.
   * Class 1 is a ButtonClass. There are 5 buttons.
   * Class 2 is a ValuatorClass. There are 6 valuators.
      + Valuator #0: 10208 - 0 (resolution: 2032)
      + Valuator #1: 7424 - 0 (resolution: 2032)
      + Valuator #2: 511 - 0 (resolution: 1)
      + Valuator #3: 63 - -64 (resolution: 1)
      + Valuator #4: 63 - -64 (resolution: 1)
      + Valuator #5: 1023 - 0 (resolution: 1)
XI_DeviceKeyPress; (deviceid = 0, type = 96, generictype = 0)
XI_DeviceKeyRelease; (deviceid = 0, type = 97, generictype = 1)
XI_DeviceButtonPress; (deviceid = 0, type = 98, generictype = 1)
XI_DeviceButtonRelease; (deviceid = 0, type = 99, generictype = 2)
XI_DeviceMotionNotify; (deviceid = 0, type = 100, generictype = 5)
XI_DeviceFocusIn; (deviceid = 0, type = 101, generictype = 5)
XI_DeviceFocusOut; (deviceid = 0, type = 102, generictype = 4)
XI_ProximityIn; (deviceid = 0, type = 103, generictype = 4)
XI_ProximityOut; (deviceid = 0, type = 104, generictype = 6)
XI_DeviceStateNotify; (deviceid = 0, type = 105, generictype = 1121144128)
Found: deviceInfo[1].name = cursor, type = 161, id = 1
Constructing new TabletDevice (id = 1, type = 161)
Constructing new WacomDevice (id = 1, type = 161)
   * Class 1 is a KeyClass. There are 5 keys from 8 to 12.
   * Class 1 is a ButtonClass. There are 5 buttons.
   * Class 2 is a ValuatorClass. There are 6 valuators.
      + Valuator #0: 10208 - 0 (resolution: 2032)
      + Valuator #1: 7424 - 0 (resolution: 2032)
      + Valuator #2: 511 - 0 (resolution: 1)
      + Valuator #3: 899 - -900 (resolution: 1)
      + Valuator #4: 1023 - -1023 (resolution: 1)
      + Valuator #5: 1023 - 0 (resolution: 1)
XI_DeviceKeyPress; (deviceid = 1, type = 96, generictype = 0)
XI_DeviceKeyRelease; (deviceid = 1, type = 97, generictype = 1)
XI_DeviceButtonPress; (deviceid = 1, type = 98, generictype = 1)
XI_DeviceButtonRelease; (deviceid = 1, type = 99, generictype = 2)
XI_DeviceMotionNotify; (deviceid = 1, type = 100, generictype = 5)
XI_DeviceFocusIn; (deviceid = 1, type = 101, generictype = 5)
XI_DeviceFocusOut; (deviceid = 1, type = 102, generictype = 4)
XI_ProximityIn; (deviceid = 1, type = 103, generictype = 4)
XI_ProximityOut; (deviceid = 1, type = 104, generictype = 6)
XI_DeviceStateNotify; (deviceid = 1, type = 105, generictype = 1121144128)
Found: deviceInfo[2].name = stylus, type = 162, id = 2
Constructing new TabletDevice (id = 2, type = 162)
Constructing new WacomDevice (id = 2, type = 162)
   * Class 1 is a KeyClass. There are 5 keys from 8 to 12.
   * Class 1 is a ButtonClass. There are 5 buttons.
   * Class 2 is a ValuatorClass. There are 6 valuators.
      + Valuator #0: 10208 - 0 (resolution: 2032)
      + Valuator #1: 7424 - 0 (resolution: 2032)
      + Valuator #2: 511 - 0 (resolution: 1)
      + Valuator #3: 63 - -64 (resolution: 1)
      + Valuator #4: 63 - -64 (resolution: 1)
      + Valuator #5: 1023 - 0 (resolution: 1)
XI_DeviceKeyPress; (deviceid = 2, type = 96, generictype = 0)
XI_DeviceKeyRelease; (deviceid = 2, type = 97, generictype = 1)
XI_DeviceButtonPress; (deviceid = 2, type = 98, generictype = 1)
XI_DeviceButtonRelease; (deviceid = 2, type = 99, generictype = 2)
XI_DeviceMotionNotify; (deviceid = 2, type = 100, generictype = 5)
XI_DeviceFocusIn; (deviceid = 2, type = 101, generictype = 5)
XI_DeviceFocusOut; (deviceid = 2, type = 102, generictype = 4)
XI_ProximityIn; (deviceid = 2, type = 103, generictype = 4)
XI_ProximityOut; (deviceid = 2, type = 104, generictype = 6)
XI_DeviceStateNotify; (deviceid = 2, type = 105, generictype = 1121144128)
Found: deviceInfo[3].name = Configured Mouse, type = 131, id = 3
Constructing new TabletDevice (id = 3, type = 131)
Constructing new WacomDevice (id = 3, type = 131)
Not an extension device!
Mouse not supported.
Name does not match one of recognized types.!
Found: deviceInfo[4].name = Generic Keyboard, type = 130, id = 4
Constructing new TabletDevice (id = 4, type = 130)
Constructing new WacomDevice (id = 4, type = 130)
Not an extension device!
Name does not match one of recognized types.!
Tablet(s) initialized.
No interesting events in the queue. Returning from ReadTablet
No interesting events in the queue. Returning from ReadTablet
No interesting events in the queue. Returning from ReadTablet
No interesting events in the queue. Returning from ReadTablet
No interesting events in the queue. Returning from ReadTablet
No interesting events in the queue. Returning from ReadTablet
No interesting events in the queue. Returning from ReadTablet
No interesting events in the queue. Returning from ReadTablet
No interesting events in the queue. Returning from ReadTablet
No interesting events in the queue. Returning from ReadTablet
No interesting events in the queue. Returning from ReadTablet
No interesting events in the queue. Returning from ReadTablet
No interesting events in the queue. Returning from ReadTablet
No interesting events in the queue. Returning from ReadTablet
No interesting events in the queue. Returning from ReadTablet
make: *** [test_applet2] Interrupt

jason@Goddess:~/Desktop/jtablet-sdk-v0.9.5_linux/c++src$

Screenshot almost identical to the 2nd post :D


JigPu
 
Last edited:
Soooo close

All right, I'm so close, and I bet it's just that I have a proprietary device, but it works just fine in stuff like The GIMP or Inkscape.


Code:
marupa@mtezeko:~/Desktop/jtablet-sdk-v0.9.5_linux/c++src$ make test_applet2
cd ../examples && appletviewer JTablet-test2.html
using java 2! (v1.4+!)
Closing all known tablets.
Tablet(s) closed.
Connected to X server.
Enumerating devices...
Found: deviceInfo[0].name = WizardPen Tablet, type = 115, id = 0
Constructing new TabletDevice (id = 0, type = 115)
Constructing new WacomDevice (id = 0, type = 115)
Name does not match one of recognized types.!
Found: deviceInfo[1].name = Configured Mouse, type = 86, id = 1
Constructing new TabletDevice (id = 1, type = 86)
Constructing new WacomDevice (id = 1, type = 86)
Not an extension device!
Mouse not supported.
Name does not match one of recognized types.!
Found: deviceInfo[2].name = Generic Keyboard, type = 85, id = 2
Constructing new TabletDevice (id = 2, type = 85)
Constructing new WacomDevice (id = 2, type = 85)
Not an extension device!
Name does not match one of recognized types.!
No tablet(s) detected.
cello.tablet.JTabletException: Could not initialize tablet.
        at cello.tablet.JTablet.initializeTablet(Native Method)
        at cello.tablet.JTablet.<init>(JTablet.java:84)
        at cello.tablet.JTablet.<init>(JTablet.java:72)
        at cello.tablettest.JTablettest2.init(Unknown Source)
        at sun.applet.AppletPanel.run(AppletPanel.java:419)
        at java.lang.Thread.run(Thread.java:619)
java.lang.NullPointerException
        at cello.tablettest.JTablettest2.init(Unknown Source)
        at sun.applet.AppletPanel.run(AppletPanel.java:419)
        at java.lang.Thread.run(Thread.java:619)
Closing all known tablets.
Tablet(s) closed.


Maybe I could 'trick' it into thinking it's name is supported?
 
All right, I'm so close, and I bet it's just that I have a proprietary device, but it works just fine in stuff like The GIMP or Inkscape.

Maybe I could 'trick' it into thinking it's name is supported?
I'm not positive this will work, but in your xorg.conf look for the InputDevice section which sets up your WizardPen. I imagine the identifier is set to "WizardPen Tablet" -- try changing it to "stylus" and then restart. I think the name of the device reported in my logs corresponds to the identifier, so modifying it would do the trick. If not, I could tweak the source a bit to explicitly allow your device.

Note that even with this trick, I'm not sure if the WizardPen will work at all with this code right now. It'll likely map things to the wrong axis unless there is some standard that all tablets follow (which would make my day :)). I could write in support for the WizardPen fairly simply if there is documentation about it on the net, but my initial search isn't showing much.

Best of luck! Be sure to let me know if this trick works, and what the results are. If I can't find documentation online, I may need to use you as a source of information :)

JigPu
 
The test applet crashes still, but it does work! I tested it in Sketcher, which uses the jtablet add-in, and it works perfectly. Better than in windows, to be honest, but that could just be because of how Ubuntu handles it.
 
The test applet crashes still, but it does work! I tested it in Sketcher, which uses the jtablet add-in, and it works perfectly. Better than in windows, to be honest, but that could just be because of how Ubuntu handles it.
Interesting! Could you post up the output? I'm interested in why the applet would crash it but Sketcher doesn't...

After looking through the WizardPen driver source code, I suspected it might work with my Wacom-centric code. They both store their data in the same way, and the WizardPen has the same features as my Graphire4 (so there weren't any wierd things I would need to write). That makes me quite happy :)

JigPu
 
Unfortunately, I don't know of any way to get the output of Sketcher, but the output of the crashed test_applet2 script is exactly what I had posted before, only with 'stylus' instead of 'Wizard Pen'. There's no data other than that.
 
Wow thats weird... The log you posted has the applet crashing because after requesting all tablets JTablet can find, it gets back an empty list. Sketcher is certianly written to handle such a problem, but that doesn't get around the fact that I never actually created any tablet devices for it to use (it prints the "Name does not match one of recognized types.!" line just before bailing out of my device constructor)... Sketcher should at best not have any pressure sensitivity (movement would still work since X handles that itself), and at worst not work at all (if it seriously tried to use the empty list of tablets as input :D)

I don't see how you'd get pressure working in Sketcher with how I understand things to be working. Its both wonderful and confusing at the same time :beer:

JigPu
 
I know it was working just fine....but since I got my new computer, I just had to go and break it, didn't I? I'm running Ubuntu 7.10 still, but this time amd64 architecture. I have gotten 32b firefox working, and java working as well. jtablet compiles and the test applet runs (and crashes upon trying to get any input). My tablet works, and has pressure naturally under linux. However, java, under 32b firefox, doesn't see jtablet. Maybe I installed it in the wrong spot, or something like that...Please help? I don't want to go back to 32 if I can help it.
 
I know it was working just fine....but since I got my new computer, I just had to go and break it, didn't I? I'm running Ubuntu 7.10 still, but this time amd64 architecture. I have gotten 32b firefox working, and java working as well. jtablet compiles and the test applet runs (and crashes upon trying to get any input). My tablet works, and has pressure naturally under linux. However, java, under 32b firefox, doesn't see jtablet. Maybe I installed it in the wrong spot, or something like that...Please help? I don't want to go back to 32 if I can help it.

I'm not too familar with porting things to 64-bit, but I'd imagine that the problem is either from the install going into the wrong spot or from java not liking a 64-bit library.

Do you have multiple versions (e.g., 32-bit and 64-bit, or 1.5 and 1.4.2) of Java installed? If you do, your JAVA_HOME and JDK_HOME variables (which define where things get installed) may be pointing to an installation which Firefox is not using. Let me know which version Firefox is using and what those two shell variables are. You should be able to find the version Firefox is using by going to about:plugins and looking for the Java plugin version. The shell variables can be determined by typing in echo $JAVA_HOME and echo $JDK_HOME at the command line.

If that isn't the problem, I'm going to have to do some research into JNI and 64-bit libraries....

JigPu
 
my 32b firefox install is using 1.6.0_03-b05

and both of the shell commands are echoing nothing, at all. other shell variables show stuff, like $HOME, but those two particular ones are blank.
 
Sorry 'bout the delay in responding. I haven't had much time to do any looking into this issue...

I think your problem is probably being caused by the library not being installed for the Java that Firefox is using. $JDK_HOME and $JAVA_HOME define where the library is installed to. If they're blank, it probably won't install correctly. Try defining them as outlined in this post and then re-doing the compile/install.

If that doesn't work, try also running make JREinstall (after running both make and make install). This will make sure that it gets installed into the JRE's library path *AND* the JDK's library path. Firefox may be using the JRE's VM rather than the JDK's VM (I had thought that things preferred the JDK if installed, but I could be wrong) which would explain the problems you're having.

If that *still* dosen't work, post up the output of the following commands: locate libjtablet.so and locate jtablet.jar (this will let me see where the files have been copied to).

JigPu
 
32bit chroot in Arch Linux, manually packaged like so
[ "$CARCH" = "i686" ] && arch=i386 || arch=amd64
mkdir -p $startdir/pkg/opt/java/jre/lib/ext
cp ../jtablet.jar $startdir/pkg/opt/java/jre/lib/ext
mkdir -p $startdir/pkg/opt/java/jre/lib/$arch
cp $srcdir/$pkgname-${pkgver}_linux/c++src/libjtablet.so $startdir/pkg/opt/java/jre/lib/$arch/

Name : jre
Version : 6u3-2

Name : jdk
Version : 6u3-1

Running LinuxWacom 7.9.4 beta


Code:
 make test_applet2
cd ../examples && appletviewer JTablet-test2.html
using java 2! (v1.4+!)
Closing all known tablets.
Tablet(s) closed.
Connected to X server.
Enumerating devices...
Found: deviceInfo[0].name = Virtual core keyboard, type = 0, id = 0
Constructing new TabletDevice (id = 0, type = 0)
Constructing new WacomDevice (id = 0, type = 0)
Not an extension device!
Name does not match one of recognized types.!
Found: deviceInfo[1].name = Virtual core pointer, type = 0, id = 1
Constructing new TabletDevice (id = 1, type = 0)
Constructing new WacomDevice (id = 1, type = 0)
Not an extension device!
Name does not match one of recognized types.!
Found: deviceInfo[2].name = Mouse0, type = 90, id = 5
Constructing new TabletDevice (id = 5, type = 90)
Constructing new WacomDevice (id = 5, type = 90)
Not an extension device!
Mouse not supported.
Name does not match one of recognized types.!
Found: deviceInfo[3].name = Keyboard0, type = 89, id = 6
Constructing new TabletDevice (id = 6, type = 89)
Constructing new WacomDevice (id = 6, type = 89)
Not an extension device!
Name does not match one of recognized types.!
Found: deviceInfo[4].name = eraser, type = 210, id = 2
Constructing new TabletDevice (id = 2, type = 210)
Constructing new WacomDevice (id = 2, type = 210)
XI_DeviceStateNotify; (deviceid = 2, type = 107, generictype = -1685099888)
Found: deviceInfo[5].name = cursor, type = 211, id = 3
Constructing new TabletDevice (id = 3, type = 211)
Constructing new WacomDevice (id = 3, type = 211)
XI_DeviceStateNotify; (deviceid = 3, type = 107, generictype = -1685099888)
Found: deviceInfo[6].name = stylus, type = 212, id = 4
Constructing new TabletDevice (id = 4, type = 212)
Constructing new WacomDevice (id = 4, type = 212)
XI_DeviceStateNotify; (deviceid = 4, type = 107, generictype = -1685099888)
Tablet(s) initialized.
No interesting events in the queue. Returning from ReadTablet
No interesting events in the queue. Returning from ReadTablet
No interesting events in the queue. Returning from ReadTablet
No interesting events in the queue. Returning from ReadTablet
and it goes on and on.
Moving the pen or clicking etc does nothing to modify the output.

Intuos 2 9x12, also have a Cintiq 20WSX plugged in but not enabled (not supported by linuxwacom yet) in xorg.
Works fine in Gimp.
 
Last edited:
Strange. It appears from the output that your tablet isn't reporting any device or event class information (aside from the lone DeviceStateNotify).

Could you try compling and running the attached version? It has a few more debugging statements included and should confirm my suspiscions. I'm not sure if its the chroot that is causing problems (since I haven't managed to create a chroot that even runs the appletviewer yet) but it might be. Could you try running The Gimp under the chroot as well to make sure it is correctly interacting with the tablet?

JigPu
 

Attachments

  • jtablet-sdk-v0.9.5_linux13.zip
    414.9 KB · Views: 230
Its the beta linuxwacom driver (7.9.4), definitely not the chroot, i get identical results with native 64bit. My chroot is setup well ;p, profiles sourced and the correct places bind mounted. Setting up your new version now. I have hotfixed libmawt.so due to it being statically linked to xinerama (sed -i 's/XINERAMA/FAKEEXTN/g') as per this bug http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6532373. I doubt this has anything to do with the wacom bits though, and from what i've read all java apps still work.

with linux13, results identical in 64bit version outside of chroot
Code:
make test_applet2
cd ../examples && appletviewer JTablet-test2.html
using java 2! (v1.4+!)
Closing all known tablets.
Tablet(s) closed.
Connected to X server.
Enumerating devices...
Found: deviceInfo[0].name = Virtual core keyboard, type = 0, id = 0
Constructing new TabletDevice (id = 0, type = 0)
Constructing new WacomDevice (id = 0, type = 0)
Not an extension device!
Name does not match one of recognized types.!
Found: deviceInfo[1].name = Virtual core pointer, type = 0, id = 1
Constructing new TabletDevice (id = 1, type = 0)
Constructing new WacomDevice (id = 1, type = 0)
Not an extension device!
Name does not match one of recognized types.!
Found: deviceInfo[2].name = eraser, type = 210, id = 2
Constructing new TabletDevice (id = 2, type = 210)
Constructing new WacomDevice (id = 2, type = 210)
Not an extension device!
Found: deviceInfo[3].name = cursor, type = 211, id = 3
Constructing new TabletDevice (id = 3, type = 211)
Constructing new WacomDevice (id = 3, type = 211)
Not an extension device!
Found: deviceInfo[4].name = stylus, type = 212, id = 4
Constructing new TabletDevice (id = 4, type = 212)
Constructing new WacomDevice (id = 4, type = 212)
Not an extension device!
Found: deviceInfo[5].name = Mouse0, type = 90, id = 5
Constructing new TabletDevice (id = 5, type = 90)
Constructing new WacomDevice (id = 5, type = 90)
Not an extension device!
Mouse not supported.
Name does not match one of recognized types.!
Found: deviceInfo[6].name = Keyboard0, type = 89, id = 6
Constructing new TabletDevice (id = 6, type = 89)
Constructing new WacomDevice (id = 6, type = 89)
Not an extension device!
Name does not match one of recognized types.!
No tablet(s) detected.
cello.tablet.JTabletException: Could not initialize tablet.
	at cello.tablet.JTablet.initializeTablet(Native Method)
	at cello.tablet.JTablet.<init>(JTablet.java:84)
	at cello.tablet.JTablet.<init>(JTablet.java:72)
	at cello.tablettest.JTablettest2.init(Unknown Source)
	at sun.applet.AppletPanel.run(AppletPanel.java:419)
	at java.lang.Thread.run(Thread.java:619)
java.lang.NullPointerException
	at cello.tablettest.JTablettest2.init(Unknown Source)
	at sun.applet.AppletPanel.run(AppletPanel.java:419)
	at java.lang.Thread.run(Thread.java:619)
 
Last edited:
The results you just posted are quite puzzling. I didn't touch the portion of code which verifies compatibility, but that check just failed because it doesn't think your tablet is an extension device.

Reading the documentation, it could be the case that the tablet was "currently being used as the X pointer". I'm not sure what exactly that means since I've used my tablet as my pointer quite a bit without seeing that ;) My best guess is that either you didn't have a mouse plugged in, or that there is something weird about the xorg.conf file.

It could also be the case that the problem in this thread is occuring. Apparently X.Org 7.3 requires slightly different code for wacom detection. Since I'm running 7.2 on my own box, I never ran into this.

~~~~
I'm going to ugrade linuxwacom to 0.7.9-8 and see what happens. They don't seem to have 0.7.9-4 up on their servers anymore but it'll at least let me see if my code is working on the development version. You can upgrade to 0.7.9-8 (or downgrade to 0.7.8-3 :D) if you want as well.

I'll post a revised version later that should work with X.Org 7.3 (though I have no way to check). In the meantime, I'd appreciate it if you'd upload your xorg.conf file so I can double-check I'm not making any false assumptions about your tablet's configuration.

JigPu
 
Back