WORKDIR /usr/src/myapp docker-compose run -rm java java HelloWorld docker-compose. |_ HelloWorld.java Dockerfile FROM java:8 (Use brew cask install APP to install GUI apps use brew install APP.) Java is not a GUI app It should not require "cask" but at least Oracle is consistent. We use brew cask since we'd otherwise use the Oracle GUI installer that will likely not install Java properly on your Mac. UPDATE: Now that Java 8 is no longer the most current version, we need to install it this way: However, it appears that the Java Application Launcher in Ubiquiti can’t find these SDKs. Nice thing about brew is it plays with others nicely, it won’t mess up your environment I promise. The current default is brew cask install java which installs version 13. Cask is a brew extension that can install things like java, chrome etc via the terminal. To get a list of all older versions of java: brew cask search java The usual workaround is to install the JDK and there is an open JDK available via brew cask install adepthjdk8 which is the version 1.8 that you need. Thanks, it's amazing how horrible the Java installation process using the "official" links/docs are.
Brew cask install java java 8 how to#
See this helpful blog post for a description of how to use brew to install an earlier version of Java if needed. java 9) rather than a specific older one (for example, Java 8 as in the OP). Note that as of October 2017, the default brew command (as well as most of those in the comments) will install whatever is the latest major version JDK (i.e. brew tap adoptopenjdk/openjdk brew cask install adoptopenjdk8 Install maven to enable compilation of SystemDS. If you want to manage multiple versions of Java on your Mac, consider using jenv. To allow relative paths: brew install coreutils To install open jdk 8. So after updating homebrew via brew update, you are set to use brew cask. Brew cask info java brew cask install java brew tap caskroom/versionsīrew cask install java jdk-8u112-macosx-圆4.dmgĪs of December 2015, it is now unnecessary to install cask manually as it is now part of homebrew's installation.