Getting JPen code to work

31 views
Skip to first unread message

Jason

unread,
Apr 13, 2010, 6:58:56 PM4/13/10
to jtablet-dev
I'm running into a bit of problem getting the backend JPen code to
work. When running the demo applet, I'm getting an unexpected
exception. When the program tries to load the X11TabletManager, JPen
throws a MissingResourceException. Looking at the code where its
thrown, I find that XInputProvider.java is trying to create a
NativeLibraryLoader using build properties. The WintabProvider uses
almost identical code, but you've obviously got it working.

The exception is below. Note that the line numbers might not perfectly
match your files since I've made some slight tweaks to a few of them.

I haven't dealt with resources at all, so I don't know where to begin
to look. Is this a problem with the ANT script? Any thoughts?

java.lang.ExceptionInInitializerError
at cello.repackaged.jpen.provider.xinput.XiBus.<init>(XiBus.java:31)
at
cello.jtablet.impl.jpen.XInputTabletManager.load(XInputTabletManager.java:
146)
at cello.jtablet.impl.TabletManagerImpl.<init>(TabletManagerImpl.java:
87)
at cello.jtablet.TabletManager.<clinit>(TabletManager.java:79)
at cello.demo.jtablet.DemoSurface.<init>(DemoSurface.java:56)
at cello.demo.jtablet.DemoApplet.createDrawingGroup(DemoApplet.java:
142)
at cello.demo.jtablet.DemoApplet.init(DemoApplet.java:52)
at cello.demo.jtablet.DemoApplet.main(DemoApplet.java:190)
Caused by: java.util.MissingResourceException: Can't find bundle for
base name jpen.build, locale en_US
at
java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:
1427)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1250)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:705)
at
cello.repackaged.jpen.internal.BuildInfo.getProperties(BuildInfo.java:
31)
at
cello.repackaged.jpen.provider.xinput.XinputProvider.<clinit>(XinputProvider.java:
39)
... 8 more

Jason

Nicolas Carranza

unread,
Apr 13, 2010, 7:43:41 PM4/13/10
to jtabl...@googlegroups.com
Hey Jason,

I removed the unnecessary "Xinput.loadLibrary()" to avoid the problem (
http://jpen.svn.sourceforge.net/viewvc/jpen?view=rev&revision=243 ). Also let
me know if you want write access to the jpen svn repo.

Cheers!
Nicolas

Jason

unread,
Apr 14, 2010, 1:04:24 AM4/14/10
to jtablet-dev
Awesome, that appears to have fixed it! The library loads right up and
detects my tablet. Unfortunately it appears to be convinced that my
tablet is in relative mode, despite xidump telling me its in absolute.
Time to look through the C code...

Jason

On Apr 13, 4:43 pm, Nicolas Carranza <nicar...@gmail.com> wrote:
> Hey Jason,
>

> I removed the unnecessary "Xinput.loadLibrary()" to avoid the problem (http://jpen.svn.sourceforge.net/viewvc/jpen?view=rev&revision=243). Also let

Reply all
Reply to author
Forward
0 new messages