[sane-devel] JSane

Andi McLean andi.mclean@ntlworld.com
Sun, 13 Jun 2004 15:25:56 +0100

Hi ,

On Sunday 13 June 2004 00:27, Klemens Dickbauer wrote:
> Hi David, Hi Andi and Chris!
> After being off for quite a long time (sorry for not communicating!) I
> restarted my work on japi_sane again this week.
> The classes I have are based on the work of Silvio Vogt and what I did is
> mainly some refactoring work (moving into the org.saneproject package
> structure, moving into a interface/implementation classes desgin, changes
> on the gui part...). It's still ongoing, but at least I can compile it
> again.
I have designed a structure to split interface and implementation how does 
everyone feel about these?
Dave what do you think about putting the JNI part in with my code?
Does it fit with the design I've created?
If not we can discuss what changes are needed. I designed the structure to 
mainly meet my needs but tried to make it so that a JNI, or other 
implementation could be used. As I needed to get it working for my main 

> I just read all the messages on this list an realized that a few people are
> working on the same issue. Your approch, Andi, seems very promising to me
> using the TCP level to communicate, coding JNI is very hard for me
> unexperienced bloke. (-;
I found the JNI difficult too, and needed to be able to port the client stuff 
to different hardware at a moments notice, so I went with a pure java 
implementation. As I said, I've tried to create the framework so it can 
accomodate other implementations. 

> Anyway, having a direct Java interface to the sane libs seems also
> desireable to me. David, what do you think about the changes I suggest? I
> had no close look into your classes so far, but I'll do tomorrow. Are you
> planning something more on these?
> I will include my few classes, though thei're not running yet. I get a
> segfault on every call, as I said before I am very unexperienced in system
> programming. Maybe someone can give me a hint on where to start.
> --
> An unexpected exception has been detected in native code outside the VM.
> Unexpected Signal : 11 occurred at PC=0x4DE37B06
> Function=sane_dll_control_option+0x56
> Library=/usr/lib/libsane.so.1
> Current Java thread:
> 	at org.saneproject.scan.sane.Sane.getControlOption(Native Method)
> 	[..]
> --
> bye for now,
> ~klemens
> Am Mittwoch, 9. Juni 2004 13:54 schrieb David Neary:
> > Hi all,
> >
> > I know that some people were asking about a Java SANE API
> > recently.
> >
> > I did some work before 1.0.14 on getting it at least
> > compiling with at least a Sun SDK, and have since been
> > quite happily using these JNI bindings. There are still
> > some bugs in here, notably for lineart mode, and I have
> > been unashamedly messing about with stuff to make it work
> > just for me, for one particular task, so it's probably
> > not pretty.
> >
> > But perhaps people who need something now will be happy
> > with it.
> >
> > This is simply a tar of the japi directory after I did
> > a make clean. I also have a dllmain.c and a project file
> > for making a sanej.dll for Windows, if anyone would like
> > those. This is more or less untested, and ymmv.
> >
> > I also have a tarball of the javadocs, but I didn't do
> > anything particular to generate them except run javadoc
> > so there's no real point in sending those to the list.
> >
> > Cheers,
> > Dave.
> >
> > --
> > David Neary
> > Phenix Engineering
> > 110 ave Jean Jaures, 69007 Lyon
> --
> Klemens Dickbauer, MSK Informatik GesmbH
> A-1160 Wien, Zeillergasse 5/309