I just got a MacBook Pro with the new M1 chip. I'd like to use native Apple Silicon code wherever possible.
I have a Java-based command-line program running and I noticed that this java
process in Activity Monitor is of type 'Intel'.
The process's path is /usr/bin/java
, which is supposed to be a Universal binary:
$ file /usr/bin/java
/usr/bin/java: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64e:Mach-O 64-bit executable arm64e]
/usr/bin/java (for architecture x86_64): Mach-O 64-bit executable x86_64
/usr/bin/java (for architecture arm64e): Mach-O 64-bit executable arm64e
So why is it running in Intel mode, and how can I run it natively?
/usr/bin/java blah_blah_blah.jar