phdoerfler wrote:in case it has not been brougth to your attention: New Java versions for Mac OS X are 64 Bit only and do not provide a way to run code in 32 bit mode (no -d32).
I am aware of that.
phdoerfler wrote: I am currently investigating how much effort it is to have NXJ (and only NXJ) use the old Java 6 from Apple, which does include a 32 bit mode. This is however not a permanent solution, because as to my current understanding newer macs will not have a Java 6 supplied from Apple any longer.
set the LEJOS_NXT_JAVA_HOME variable to the root directory of Java 6, and you should be fine.
How are you going to deal with that problem? There are multiple things coming to my mind right now:
- Try to find a way to communicate with the brick and libraries in 64 bit mode (might not be possible technically)
- Compile an own 32bit version of OpenJDK 7 for Mac OS X (that should not be that hard according to this blog post)
- Rely on SoyLatte
- Support NXJ on Mac only for Macs who still have Apple's Java 6 with them
For those wondering: Java 6 hides there: /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0
Apple's JDK uses a different directory layout than Oracle's. As Lejos expects the directory layout of Oracle's JVMs, this might be a problem. I will try creating a fake JDK with Oracle's layout but symlinking to Apple's files.
Please tell how you are going to deal with that issue.
Lego is not going to provide a 64Bit driver, as it seems. Simply because their applications are 32Bit only.
It was rumored, that somebody wrote a C program for OSX that would talk to the NXT via OSX's native USB API. However, the source was never published and any attempt to find out who wrote the program was unsuccessful so far.
That Apple's JDK has a different layout than Oracle's is news to me. I have successfully run leJOS using /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home as JAVA_HOME/LEJOS_NXT_JAVA_HOME (which is the path suggested in our tutorial on how to install leJOS on OSX).
Shipping a seperate JDK for leJOS is somewhat cumbersome. Also, Eclipse would have to run with that JDK if the Eclipse plug-in is supposed to work.
I believe, there are two sensible options:
1) Have our own driver for the NXT or use some OSX API for USB access that doesn't require a special driver
2) instead of loading a JNI library, start an external OSX binary (32bit) which uses the Lego driver to communication with the NXT
libusb for OSX might be a possibility too. But I vaguely recall that it has been tried before and didn't work nicely.
BTW: I don't own a Mac. As you might know, Apple thinks it a great idea that people that want to developer for OSX need to buy a Mac. I won't.
Only one other project member has a Mac (Shawn) but he's not actively researching this issue, AFAIK.