Any luck on the mac?

327 views
Skip to first unread message

MattJones

unread,
Jan 3, 2008, 9:44:19 PM1/3/08
to zxing
Hello,

I do all my development on the mac. I'm looking for a barcode reader
that will work, and zxing looks promising. However, it has a
dependency on WTK, which apparently is only available for windows and
linux. Any ideas?

Thanks,

Matt

srowen

unread,
Jan 3, 2008, 10:05:07 PM1/3/08
to zxing
You only need WTK to build the Java ME client, so if you are just
using the core library, it should be fine if you do not have WTK
installed. Can you successfully compile "core" in fact? IIRC it worked
on my Mac.

If I misunderstand and you need to build the Java ME client, yeah you
are out of luck, but only slightly. We need the "preverify" binary
from WTK to build the executable .jar file. But that's the only catch.
In fact if you install WTK on a Linux box and copy it over, you can do
everything but preverify, which is something -- you can at least
develop against the Java ME libraries.

MattJones

unread,
Jan 4, 2008, 2:13:00 PM1/4/08
to zxing
Core does not compile due to errors that WTK is missing. I do not
need the Java ME client.

I'll try compiling on a linux box tonight and see if it works to copy
the jar file to the mac.

Thanks,

Matt

srowen

unread,
Jan 4, 2008, 3:20:48 PM1/4/08
to zxing
Yes I misspoke. core does end up needing WTK as well.

It uses the core Java libraries included with WTK to ensure that only
the classes available in CLDC / MIDP are used even in the core
library.

You could simply remove all occurrences of this line in core/
build.xml:

bootclasspath="${javame-compile-bootclasspath-path}"

I think this would then work for you, though if you change the code
significantly, you might accidentally use a class that is not
available in Java ME. But it sounds like you are not developing for
Java ME anyway.

Alternatively, yes, I think if you merely copy a WTK installation
directory from a Linux box it will contain the .jar files you need to
build core. You will not be able to build javame but it sounds like
you do not need to.

Sean

MattJones

unread,
Jan 5, 2008, 10:43:05 AM1/5/08
to zxing
We are getting closer! I've modified the ant script as you
recommended, and below is the output.

MacBook:~/Projects/checkout/vendor/modified/zxing/core matt$ ant
Buildfile: build.xml

init:

build:
[mkdir] Created dir: /Users/matt/Projects/checkout/vendor/modified/
zxing/core/build
[javac] Compiling 51 source files to /Users/matt/Projects/checkout/
vendor/modified/zxing/core/build

BUILD FAILED
/Users/matt/Projects/checkout/vendor/modified/zxing/core/build.xml:37:
The <jar> type doesn't support the "level" attribute.

Total time: 3 seconds

MattJones

unread,
Jan 5, 2008, 10:51:39 AM1/5/08
to zxing
I just took out the level=9 attribute on the <jar> line in the
build.xml file, and it said build successful on the mac!

srowen

unread,
Jan 5, 2008, 12:26:37 PM1/5/08
to zxing
I think this is only available in later versions of Ant. You can
update to 1.7 or yes just take it out of your copy -- it is not
terribly important.
Reply all
Reply to author
Forward
0 new messages