- Download ZXing
- Unpack it.
- Read this post
- ... or just download my modified build.xml file and put it in core/build.xml
- Change into core and run ant
- Change into javase and run ant
- Change into the zxing root and try running the command line client:
java -cp javase/javase.jar:core/core.jar com.google.zxing.client.j2se.CommandLineRunner http://www.idautomation.com/ucc_ean_128.jpeg
The result should look like this:Raw result: 81007123452112345678 Parsed result: 81007123452112345678
- Rejoice.
import javax.media.jai.*; import com.sun.media.jai.codec.*;
image = ImageIO.read(uri.toURL());
PlanarImage pi = JAI.create("URL", uri.toURL()); image = pi.getAsBufferedImage();
Comments
Anonymous said...
Excellent info. Just what I needed. Thanks!
Andy
Johannes Fahrenkrug said...
Hey Sean,
Thanks for the feedback. I understand that the WTK dependency makes sense for making sure it'll run on JavaME, but getting it to compile on the Mac out-of-the-box would surely be great :)
Thanks for all the hard work and this truly great library!
srowen said...
Yeah great, thanks much for this. You are right, the WTK dependency from core is actually almost not even there. The only reason it is there is because we want to compile the core -- which does not depend on Javame classes, but cannot depend on non-Javame classes if it is to work in that environment -- against the Javame subset of Java's core APIs.
It would of course compile against desktop Java's classes too. I suppose you risk then changing the code in a way that compiles against Java but not Javame's subset. But that's only an issue for developers I suppose and it is a really small risk, and one we'd catch at release.
I could introduce a change to just use Java's classes when on a mac (which is what I use too). That would address this without need for tweaks. I'll get on it.
sonomos said...
Sun / Oracle released the JME SDK for OS X a short while ago.
March 16, 2010 10:58 PM