[sane-devel] Java API (japi) Changes

Chris Chesney cchesney at go-integral.com
Fri Oct 24 21:08:58 BST 2003


This is a repost of the japi portion of "Possible Fujitsu Driver Bug" with a more appropriate subject as requested...
----
 
We've created a beta version of a web-based document management system that we hope to provide as an open source solution if the product matures.  The solution is Java based and our intent was to use the JNI wrappers provided in the japi directory as means to control the backend scanning.  We're learning as we go, but this is what we've done so far:
 
1.  Fixed a bug in Sane.c - Line 268 should be   
jclass stringClass = (*env)->FindClass(env, "java/lang/String");
*NOT*
jclass stringClass = (*env)->FindClass(env, "String");
 
2.  Added a package statement to the following 5 java classes.  For our purposes, I called the package japi.  It would be more appropriate to follow the typical package naming convention and would ask for a suggestion from you if you want this committed to the project.
- SaneDevice.java
- SaneOption.java
- SaneParameters.java
- SaneRange.java
- Sane.java
 
3.  By making these files part of a package, Sane.c requires an additional change to make the object references fully qualified.
 
We haven't done anything with the Swing app that is included in the japi directory because we lack the experience in Swing and it isn't necessary for the project we're working on.  If your interested in separating the wrapper code from the example java apps, we're almost there and would be happy to work with you to get it committed.  If you were looking for more of a complete overhaul of the entire directory, we're probably not up for the challenge.
 
Comments or suggestions?
 
Thanks,
 
Chris


More information about the sane-devel mailing list