Answers.Body: <p>I've managed to get leJOS working on macOS Sierra, minus Bluetooth support. <a href="https://lejos.sourceforge.io/forum/viewtopic.php?f=7&amp;t=3833" rel="nofollow noreferrer">Bluetooth support is officially broken</a> and has been for a while. <a href="https://sourceforge.net/projects/lejos/files/lejos-NXJ/" rel="nofollow noreferrer">There also hasn't been a new release in years</a>, so a fix likely won't come. Otherwise it still works, if you jump through some hoops.</p>
  
  <h1>Guide:</h1>
  
  <h2>1. Fantom Driver:</h2>
  
  <p>First, you need to install the "Fantom driver". You can find on <a href="https://www.lego.com/en-us/mindstorms/downloads" rel="nofollow noreferrer">the Mindstorms download page</a>.</p>
  
  <p>Extract that ZIP, and you should have a installer package named <code>MAC legodriver.pkg</code>. Unfortunately, it may or may not install. Some people say it installs for them, but it doesn't install for me.</p>
  
  <p>If it doesn't install, <a href="https://github.com/JrMasterModelBuilder/Mindstorms-Fantom-Drivers-Mac-Install" rel="nofollow noreferrer">someone has created a script</a> that can unpack the installer and get around the compatibility issues.</p>
  
  <h2>2. Legacy Java 6 with 32-bit support:</h2>
  
  <p>You need to install <a href="https://support.apple.com/kb/dl1572?locale=en_US" rel="nofollow noreferrer">Apple's legacy Java 6 package</a> with 32-bit support. Sierra isn't listed as supported, but it still works.</p>
  
  <p>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.</p>
  
  <p>(<a href="https://sourceforge.net/p/lejos/wiki-nxt/Route%20to%2064Bit%20on%20Windows%20and%20OS%20X/" rel="nofollow noreferrer">Incidentally, there were some plans to make it support 64-bit Java</a>, but I wouldn't hold my breath.)</p>
  
  <h2>3. Download leJOS:</h2>
  
  <p>Download and extract leJOS for Mac <a href="http://www.lejos.org/nxt/nxj/tutorial/Preliminaries/GettingStartedMac.htm#8" rel="nofollow noreferrer">as instructed here</a>.</p>
  
  <h2>4. Setup environment:</h2>
  
  <p>You need to setup some environment variables <a href="http://www.lejos.org/nxt/nxj/tutorial/Preliminaries/GettingStartedMac.htm#10" rel="nofollow noreferrer">as vaguely specified here</a>. You will want to add something like the following to your <code>.bash_profile</code>, <code>.profile</code>, or other shell startup script, adjusting the <code>NXJ_HOME</code> to where you extracted leJOS.</p>
  
  <pre><code># 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"
  </code></pre>
  
  <p>(The <code>LEJOS_NXT_JAVA_HOME</code> variable is how you tell leJOS to use the legacy Java version.)</p>
  
  <h2>5. Profit:</h2>
  
  <p>Now when you open a new shell, the leJOS commands should work.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-05-24T02:07:52.450Z
Answers.Text: are you running eclipse Neon or an older version of Eclipse?
Answers.UserDisplayName: ProgrammingCuber
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-05-24T02:08:35.263Z
Answers.Text: @ProgrammingCuber I've never used the Eclipse plugin. I'm afraid I don't know anything about it.
Answers.UserDisplayName: Alexander O'Mara
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-05-24T02:12:51.513Z
Answers.Text: well if you could try it out and see if it works I would be interested :) just search the marketPlace and install it from there. Since you have the other things working it should be fine. Just upload the NXT firmware and then try to run a simple program and see what it outputs.
Answers.UserDisplayName: ProgrammingCuber
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-05-24T02:35:58.327Z
Answers.Text: I did do everything  in your tutorial but I still have problems running it I still get the same error, I can't run it in eclipse.
Answers.UserDisplayName: ProgrammingCuber
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-05-24T02:37:52.483Z
Answers.Text: @ProgrammingCuber If it's the 32-bit error, you might need to configure Eclipse to use a specific Java runtime or something. Not sure, I haven't used Eclipse in years.
Answers.UserDisplayName: Alexander O'Mara
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-05-25T21:40:12.703Z
Answers.Text: It turns out that it need a lower version of eclipse :( I would have to downgrade from eclipse Oxygen down to eclipse luna from years ago .
Answers.UserDisplayName: ProgrammingCuber
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-05-24T01:53:16.717Z
Answers.LastActivityDate: 2017-05-24T17:38:33.403Z
Answers.LastEditDate: 2017-05-24T17:38:33.403Z
Answers.UserDisplayName: Alexander O'Mara
Answers.Body: <p>The one thing I needed to change to make the above solution work was this:</p>
  
  <pre><code>LEJOS_NXT_JAVA_HOME="/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home"
  </code></pre>
  
  <p>I hope this can be of help to someone.</p>
  
  <p>Wim</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-06T21:41:47.103Z
Answers.LastActivityDate: 2018-01-06T21:41:47.103Z
Answers.UserDisplayName: Wim Daniëls
Body: <p>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.</p>
  
  <pre><code>Error: This Java instance does not support a 32-bit JVM.
  Please install the desired version.
  Linking the file failed with exit status 1
  </code></pre>
  
  <p>The Java 6 I installed was from Apple's legacy Java 2015.
  In the installation tutorial of leJOS it said that </p>
  
  <blockquote>
    <p>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. </p>
  </blockquote>
  
  <p>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?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-05-23T20:25:08.543Z
Comments.Text: I've gotten it to work on Sierra, minus Bluetooth support. There are a couple of hoops to jump through, that aren't made clear. I'll write up an answer later when I have time.
Comments.UserDisplayName: Alexander O'Mara
Tags: <nxt><lejos><mac>
Title: How to get leJOS to run on macOS Sierra
UserDisplayName: ProgrammingCuber
ThreadText: # How to get leJOS to run on macOS Sierra
  
  (Asked by: username_0 on 2017-05-23)
  
  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?
  
  **Tags:** nxt, lejos, mac
  > **Comments:**
  > **username_1**: I've gotten it to work on Sierra, minus Bluetooth support. There are a couple of hoops to jump through, that aren't made clear. I'll write up an answer later when I have time.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2017-05-24. Score: 3 | Accepted answer
  
  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///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.
  
  > **Comments:**
  > **username_0**: are you running eclipse Neon or an older version of Eclipse?  
  > **username_1**: @ProgrammingCuber I've never used the Eclipse plugin. I'm afraid I don't know anything about it.  
  > **username_0**: well if you could try it out and see if it works I would be interested :) just search the marketPlace and install it from there. Since you have the other things working it should be fine. Just upload the NXT firmware and then try to run a simple program and see what it outputs.  
  > **username_0**: I did do everything  in your tutorial but I still have problems running it I still get the same error, I can't run it in eclipse.  
  > **username_1**: @ProgrammingCuber If it's the 32-bit error, you might need to configure Eclipse to use a specific Java runtime or something. Not sure, I haven't used Eclipse in years.  
  > **username_0**: It turns out that it need a lower version of eclipse :( I would have to downgrade from eclipse Oxygen down to eclipse luna from years ago .  
  
  ---
  
  ### Answer by username_2 on 2018-01-06. Score: 2
  
  The one thing I needed to change to make the above solution work was this:
  LEJOS_NXT_JAVA_HOME="/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home"
  
  I hope this can be of help to someone.
  Wim
  
  
  ---
  
  