What is the default Java executable file on Mac?
When I click the 3 dots next to an installation of Minecraft (in my case 1.18.1), and click
Advanced, it doesn't mention anything in the
Java Settings (Advanced).
So my question is: What's the default Java executable on Mac for Minecraft?
Minecraft does not by default use any externally-installed Java installation on Mac. Instead, when you first run it, it downloads its own copy of the Java runtime. The
javaexecutable itself is at:
where ~ is the user account's home directory. The Library directory is hidden by default by Finder to help users avoid making changes which could break their programs, but you can get to it by selecting "Go > Go to Folder…" from the Finder's menu bar and entering "~/Library" in the box that appears.
If you have a hard time finding the runtime, just launch Minecraft (the game itself, not just the launcher), then in the macOS dock, find the "java" icon in the Dock (the list of icons which usually runs horizontally at the bottom of the screen - try using Command-Tab to switch to the Finder and then move your pointer all the way to the bottom of the screen if you don't see it), and Control-Click (or right-click) it and select "Options > Show in Finder" from the contextual menu that appears.
Incidentally, if what you're trying to do is get Minecraft to use an M1-optimized build of Java for better performance, the instructions in https://infotoast.org/site/index.php/2021/06/19/how-to-optimize-minecraft-1-17-for-m1/ worked great for me.