Compiling on Mac OS X

This forum is used to discuss questions and details regarding the AVRcamVIEW PC application.

Compiling on Mac OS X

Postby rburns » Tue Feb 01, 2005 6:55 pm


After lots of "fun" getting rxtx installed and working, I managed to get AVRcamVIEW mostly compilied. Im down to one error:

./avr/swing/ putClientProperty(java.lang.Object,java.lang.Object) in javax.swing.JComponent cannot be applied to (java.lang.String,boolean)

For fun I commented this line out and created a jar, but when I try to run the jar I got this:

Failed to load Main-Class manifest attribute from

I don't have much experience with Java, but it seems there may be a component missing from the source.

Any Ideas on these 2 issues?
OS X is using Java 1.4.2, no 1.5 yet :(


PS. I would really like it if there existed a pre-built version for 1.4
What ever happened to Java being portable?
Posts: 7
Joined: Fri Jan 14, 2005 11:44 pm

Re: Compiling on Mac OS X

Postby rgaimari » Tue Feb 01, 2005 9:40 pm

rburns wrote:./avr/swing/ putClientProperty(java.lang.Object,java.lang.Object) in javax.swing.JComponent cannot be applied to (java.lang.String,boolean)

I believe that the line causing the problem is:

closeB.putClientProperty("paintActive", true);

"true" is a boolean, not an Object. That's what is causing the problem; putClientProperty is expecting it's two arguments to be Objects. The first already is (a String). To make them both Objects, try:

closeB.putClientProperty("paintActive", new Boolean(true));

Now that you refresh my memory, I think I had this problem when I did the recompile, too. This should fix it.

- Bob
Posts: 3
Joined: Tue Nov 30, 2004 2:41 pm

AVRcam now works on OS X

Postby rburns » Wed Feb 02, 2005 10:24 pm


Thanks for the help. Changing "true" to "new Boolean(true)" worked, AVRCamView now compiles correctly.

After a bit more work, I copied the file from the released jar, and I included and in resources, and now AVRCamVIEW compiles and runs!

Im super excited. I also finished a C library for interacting with the camera.

Thanks again,
Posts: 7
Joined: Fri Jan 14, 2005 11:44 pm

Postby Bud » Wed Feb 02, 2005 11:10 pm

Thanks for your response Bob. Because I'm using JDK 1.5, the compiler boxes (inserts the code to create an object from a primitive type) the "true" primitive type to a Boolean type. This is why you have to use the following line if you are not using JDK 1.5
Code: Select all
closeB.putClientProperty("paintActive", new Boolean(true));

I have changed my code so that you can compile it under JDK 1.4.

I also realized that my ant build script did not make it into the source zip file. That will be added to the next release of the AVRcam software.

Ryan, could you send me the files and instructions for getting the rxtx working on a MAC so I can add it to the distribution CD for the AVRcam. (

With regards to the AVRCamView.jar file you were trying to run, was that the one you built or the one shipped on AVRcam CD? If you built the jar file, you have to add a manifest file that contains the line:
Code: Select all
Main-Class: avr.swing.JAVRCamFrame

Then to create the jar file issue the following command:
Code: Select all
jar -mf manifest AVRcamView.jar classes

The next release of the AVRcamView will be made public next week along with a new version of the AVRcam embedded software.

-- Bud
Posts: 9
Joined: Sun Dec 12, 2004 5:37 pm

Return to AVRcamVIEW PC Application

Who is online

Users browsing this forum: No registered users and 1 guest