

Samples, with source code, of programming for certain Java API's.These include examples that use Swing and other Java Foundation Classes, and the Java Platform Debugger Architecture. Examples, with source code, of programming for the Javaplatform.Additional class libraries and support files required by the development tools.The JRE includes a Java Virtual Machine (JVM), class libraries, and other files that support the execution of programs written in the Java programming language. An implementation of the Java Runtime Environment (JRE) for use by the JDK.Tools and utilities that will help you develop, execute, debug, and document programs written in the JavaTM programming language.This tool also helps to manage JAR files, javadoc-document generator, automatic generation of documents from source code comments, jdb-debugger, jps-process status tools, display process information of the current Java process, javap-class file disassembler, Other components are also included. Select the Java version you want to use as the default from the list of installed Java versions.Ĭlick on the "OK" button to close the "Java Applet Runtime Settings" window.JDK has a set of programming tools, including javac, jar, and archiver, which package related class libraries into a single JAR file. Open the "System Preferences" pane by clicking on the Apple icon in the top left corner of your screen and selecting "System Preferences".Ĭlick on the "Java" icon in the "System Preferences" pane.Ĭlick on the "Java" tab in the "Java Control Panel" window that appears.Ĭlick on the "View" button in the "Java Applet Runtime Settings" section. To change the default Java (JDK) version on macOS using the "System Preferences" pane, follow these steps: Method 3: Using the "System Preferences" pane

If you want to set the default Java version system-wide, you can modify the /etc/paths file instead. bashrc file will only affect the current user. Verify the default Java version by running the command java -version in the terminal.Run the command source ~/.bash_profile or source ~/.bashrc to apply the changes.

Export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)
