If you purchased a new Mac device (Macbook, iMac, Mac mini) and trying to run java or javac command in Terminal you will get the below error as there is no Java Runtime pre-installed.
code2care@mac ~ % java
The operation couldn’t be completed. Unable to locate a Java Runtime.
Please visit http://www.java.com for information on installing Java.
code2care@mac ~ % javac
The operation couldn’t be completed. Unable to locate a Java Runtime.
Please visit http://www.java.com for information on installing Java.
You need to visit http://www.java.com and download java dmg setup and install.
Note: Native M1 Oracle Java is not yet available for MacBooks/Mac Mini's that are running on Apple Silicon M1 Chips, this setup will work using Rosetta 2 - which will convert the code for you!
Intel-based Mac running Mac OS X 10.7.3 (Lion) or later.
Update: You can install Open JDK that natively supports M1 Mac's : https://code2care.org/q/install-native-java-jdk-jre-on-apple-silicon-m1-mac
- How to list all users in Mac Terminal
- Docker Desktop needs privileged access macOS
- Mac: How to show count of files and folders in Finder
- How to Change Background Color TextEdit on Mac
- How to adjust MacBook Desktop icons size
- Test internet speed using macOS Terminal command
- How to change the default font and text size in Microsoft Excel for Mac
- How to install Java on macOS [Big Sur]
- How to come out of dquote prompt in Terminal - macOS/Linux
- How to Increase MacBook Trackpad Cursor Speed on macOS Ventura/Sonoma
- Fix: Microsoft Excel Quit Unexpectedly on Mac
- How to Adjust macOS System Font Size
- How to Quit Applications on Mac Using Terminal
- How to check zsh installed version using terminal
- Two Ways to Extract rar (*.rar) files on Mac
- How to Right Click on Mac Desktop?
- How to Add Brew to PATH M1/M2 Mac
- How to search (find) in macOS Terminal Console Text
- macOS 13 Ventura - The New About this Mac Window
- TextEdit Get the count of lines in a file
- How to run .sh file in Mac Terminal
- Google Search Hot Trends Screensaver for Mac OS X
- Check Reboot History Mac
- [Solution] Mac Update Stuck Preparing macOS Ventura 13.0 About 30 minutes remaining
- Display Safari URL address link on hover
- Okta Hacked - Source Code Stolen from GitHub Repo - News
- Where does brew install python in macOS - Python
- Fix - macOS Sonoma 14 - zsh: command not found: python - Python
- RabbitMQ Java Spring Boot Application Properties List - Java
- Convert text to random case using Notepad++ - NotepadPlusPlus
- [Solution] Error: brew cask is no longer a brew command - MacOS
- Python raise error with message example - Python
- How to take Screenshots on macOS Sonoma 14 using Keyboard - MacOS