[sane-devel] Try it out: SANE, JNI and Java all in an applet

Oliver Schwartz Oliver.Schwartz at gmx.de
Thu Jan 26 23:27:40 UTC 2006


Hi,

> I noticed in my logs that some people are trying this.  However, I
> posted the wrong link.  This is the correct link to scan from your
> browser.

I didn't get it to work here, after several attempts. Some notes:
- In konqueror you need to disable the security manager (in settings / 
java), otherwise it won't load the jni library
- Enabling the java console is helpful (also in settings / java)
- On a 64 bit Linux installation you need a 32 bit jvm, as well as a 
32 bit version of the SANE libraries
- If you're using firefox you need to install the java plugin as 
described here: http://plugindoc.mozdev.org/linux.html#Java
- If no scanner can be found the applet crashes with:
caught this fat one: java.lang.ArrayIndexOutOfBoundsException: 0

After I solved these issue the applet initializes my scanner, but it 
doesn't scan. Instead, I get another exception:
caught this fat one: chiralsoftware.scanner.SaneException: Could not 
set an option value for name: depth

I guess this is because there's no option named depth for my scanner 
(it only supports one depth). So I guess the applet needs to check if 
an option exists before it tries to set it.

Also, for those who missed the link since it's only visible if you 
read the html mail, it's 
http://chiralsoftware.net/scanner/applet.html (in general, you should 
avoid posting of html messages to mailing lists).

Regards,
Oliver



More information about the sane-devel mailing list