How to get leJOS to run on macOS Sierra I am working with an eclipse plugin that requires it to run 32bit Java 6 on it and I do have Java 6 on my computer but when I run the program I get this error.

Error: This Java instance does not support a 32-bit JVM.
Please install the desired version.
Linking the file failed with exit status 1


The Java 6 I installed was from Apple's legacy Java 2015.
In the installation tutorial of leJOS it said that 


  Note that even if you have a 64-bit system, leJOS will always chose to run java in 32 Bit mode by automatically passing the -d32 parameter to the java command whenever necessary. 


If that is the case why doesn't my program run if I have Legacy Java 6 installed on my Mac? Can anyone get it to work on their mac on this version macOS?
I've managed to get leJOS working on macOS Sierra, minus Bluetooth support. Bluetooth support is officially broken and has been for a while. There also hasn't been a new release in years, so a fix likely won't come. Otherwise it still works, if you jump through some hoops.

Guide:

1. Fantom Driver:

First, you need to install the "Fantom driver". You can find on the Mindstorms download page.

Extract that ZIP, and you should have a installer package named MAC legodriver.pkg. Unfortunately, it may or may not install. Some people say it installs for them, but it doesn't install for me.

If it doesn't install, someone has created a script that can unpack the installer and get around the compatibility issues.

2. Legacy Java 6 with 32-bit support:

You need to install Apple's legacy Java 6 package with 32-bit support. Sierra isn't listed as supported, but it still works.

This legacy version of Java probably won't become the default if you have a new version installed, but that's fine, we will configure leJOS to use this version later.

(Incidentally, there were some plans to make it support 64-bit Java, but I wouldn't hold my breath.)

3. Download leJOS:

Download and extract leJOS for Mac as instructed here.

4. Setup environment:

You need to setup some environment variables as vaguely specified here. You will want to add something like the following to your .bash_profile, .profile, or other shell startup script, adjusting the NXJ_HOME to where you extracted leJOS.

# leJOS
export LEJOS_NXT_JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home"
export NXJ_HOME="/Users/&lt;USER&gt;/&lt;PATH_TO&gt;/LeJOS/leJOS_NXJ_0.9.1beta-3"
export PATH="$PATH:$NXJ_HOME/bin"


(The LEJOS_NXT_JAVA_HOME variable is how you tell leJOS to use the legacy Java version.)

5. Profit:

Now when you open a new shell, the leJOS commands should work.