Manually installing Mars on Apple M1

Hi,

Mars is a .jar file so it needs a Java Runtime to work properly. Since there is no native m1 version I thought id share the open source one that worked for me to run Mars!

9 Likes

really helpful
Thanks a lot!

If you have homebrew installed, there is an even easier way to install a JDK:

brew install openjdk@17

(The 17 is the specified to install version 17 instead of 18, which we are using in this course)

After the installation is complete, you can run

sudo ln -sfn $(brew --prefix)/opt/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-17.jdk

(as prompted by the output after the installation)

Then you will be able to just run any jar* systemwide and use the java command in your terminal.

* To run unverified programs with MacOS, use Right-Click on your file while holding Shift, select Open, then Open again.

3 Likes

As far as I know this official JDK does not support the M1 (ARM type cpu)

It actually does. It’s even a native arm64 executable!