We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOther Libraries › Processing QRCode Library
Page Index Toggle Pages: 1
Processing QRCode Library (Read 890 times)
Processing QRCode Library
Oct 23rd, 2007, 9:22pm
 
Hi,

I just have tried the Processing QRCode Library after having troubles with installing QTJava (see this thread).

Now that that the video bug is fixed in version 0131, and the video library is working again, I wanted to capture QRCode with this library from Daniel Shiffman. When executing the QRCode Library Example (link) I get the following error:

java.lang.UnsupportedClassVersionError: pqrcode/Decoder (Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

Although I have got the latest Java SDK from Sun, it seems that there is a version error. Does anyone know what I can try to do to avoid this It seems java isn't compatible with the qrcode library.

Regards,

Jeroen

Re: Processing QRCode Library
Reply #1 - Oct 23rd, 2007, 10:01pm
 
http://www.google.com/search?as_sitesearch=processing.org&as_q=unsupportedclassversionerror
Re: Processing QRCode Library
Reply #2 - Oct 24th, 2007, 4:52am
 
Aw shucks, I think this is something I can fix by recompiling with backwards java compatibility.  Can you e-mail me and I'll send you a new version to test?  then i'll update my library site if it works. . .

are you on mac or pc?  

Dan
Re: Processing QRCode Library
Reply #3 - Oct 24th, 2007, 11:09am
 
Hi Daniel,

I am working on a PC. What I've done now is that I replaced the Java directory in the processing program folder with the new version of Java I have. It seems processing is using an older version of Java. That way processing isn't compatible with your library (I'm just getting into java, so please correct me if my assumptions are wrong).

Now it works, but after a few tries with succesful decoding from webcam and unsuccesful decoding (I tried turning the code upside down and diagonal) I get the following error message:

java.lang.ArrayIndexOutOfBoundsException: 44
at jp.sourceforge.qrcode.codec.reader.QRCodeDataBlockReader.getNextBits(QRCodeDataB
lockReader.java:65)


After another try i got this:

Exception in thread "Thread-4" java.lang.IllegalStateException: This method must be called after QRCodeImageReader.getQRCodeSymbol() called
     at jp.sourceforge.qrcode.codec.reader.QRCodeImageReader.getQRCodeSymbolWithAdjusted
Grid(QRCodeImageReader.java:241)


Is this a result of java versions or is it in the library?

Also I want to know if this library can be used as an online applet where I want to use it load URL's. I got it to work in an executable, but not in an applet.

Thanks for your help,

Jeroen
Page Index Toggle Pages: 1