Java Jre 1.6 For Mac
2021年6月19日Download here: http://gg.gg/v1wmv
Downloading & Installing the JRE Installer on Windows platform:
OpKey Web supports Java 8 or above versions. JDK is a superset of JRE, and contains everything that is in JRE, plus tools such as the compilers and debuggers necessary for developing applets and applications. If you are installing JDK then you don’t need to install JRE separately.
You can download JRE 8 or above version and install it on your machine. The JRE Installer is located on the Java SE Runtime Environment 10 Downloads page.
*In a browser, go to the Java SE Runtime Environment 10 Downloads page.
The following JRE installers are available for you to download: https://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html
*Windows Offline:jre-10.interim.update.patch_windows-x64_bin.exe
*Download the JRE installer according to your requirement.
You can open the JRE 1.6.020 image file with Pacifist software and extract all the folders with the framework into the System Library Frameworks JavaVM.framework Versions folders. After that the JRE should appear in your Applications/Utilities/Java Preferences JRE selection menu, where you can switch between the running JRE’s. 1.6 The java formula is keg-only, which means it is installed in /usr/local/Cellar but not linked into places like /usr/local/bin or /Library/Java/JavaVirtualMachines/ (macOS /usr/bin/java wrapper). For macOS /usr/bin/java wrapper to find the installed JDK, we manually create a symbolic link at /Library/Java/JavaVirtualMachines/. Many Adobe applications depend on the Oracle Java Runtime Environment (JRE) for some features to work. Apple recently changed the way it includes Java in Mac OS, and with Lion, Java is no longer preinstalled. It is now an optional install that you must select.
Note:
The Windows Offline installer and Windows installer contains everything that is required to install the JRE. The Microsoft Windows Installer (MSI) Enterprise JRE Installer is also available, which enables you to install the JRE across your enterprise. It requires a commercial license for use in production.
Downloading the JRE Installer
*Open Java SE Runtime Environment Downloads page.
*Click Accept License Agreement, and then, under the Downloads menu, click the link that corresponds to the installer for your version of Windows.
*Note the file size specified on the download page and, after the download has completed, verify that you have downloaded the complete file.
Running the JRE Installer
You must have Administrative privileges in order to install the JRE on Microsoft Windows.
Start the JRE 8 Installer by double-clicking the installer’s icon or file name in the download location.
Installation wizard shows some important information. Click OK to proceed installation.
JRE Installation is in progress.
You get following message once JRE gets installed successfully on your Windows machine.
JRE 8 has been installed on your machine successfully. Further, you need to configure Path of Environment Variable.Configuration of Java Environment Variable Path:
Before you start working on OpKey Web, need to setup Java Environment Variable path on that machine by following below steps:
*Select Control Panel and then System.
*Click Advanced system settings.
*Navigate to the Advanced tab and click on Environment Variables.
*Go to the System Variables tab and click on New.
*Enter JAVA_HOME as Variable Name and the Path of installed JDK as Variable Value.
*Click on OK. Close other windows while clicking OK.
Java Variable path has been configured successfully.How to check Java Version installed on your Windows machine?
You can easily check the version of Java installed on your machine. Follow the below given instructions:
*Open command prompt (Press Windows with R & type CMD).
*Type Java -version and press enter.
*Java Version installed on the machine can be viewed easily.How to check Java Version installed on your Mac machine?
You can easily check the version of Java installed on your machine. Follow the below given instructions:
(A) If JDK is installed on your Mac machine then you should follow the below given steps:
*Open Terminal on your Mac machine.
*Type Java -version command and press enter.
*Java Version installed on the machine can be viewed easily.
(B) If only JRE is installed on your Mac machine then you should follow the below given steps:
*Open Terminal on your Mac machine.
*Type following command and press Enter:
/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java -version
*Java Version installed on the machine can be viewed easily.
The Java Development Kit (JDK), officially named ’Java Platform Standard Edition’ or ’Java SE’, is needed for writing Java programs. The JDK is freely available from Sun Microsystems (now part of Oracle). The mother site for JDK (Java SE) is http://www.oracle.com/technetwork/java/javase/overview/index.html.’JDK’ or ’JRE’?
JRE (Java Runtime) is needed for running Java programs. JDK (Java Development Kit), which includes JRE plus the development tools (such as compiler and debugger), is need for writing as well as running Java programs. In other words, JRE is a subset of JDK. Since you are supposed to write Java Programs, you should install JDK, which includes JRE.JDK Versions
Reference: ’Java Version History’ @ https://en.wikipedia.org/wiki/Java_version_history.
*JDK Alpha and Beta (1995): Sun Microsystem announced Java in September 23, 1995.
*JDK 1.0 (January 1996): Originally called Oak (named after the oak tree outside James Gosling’s office). Renamed to Java 1 in JDK 1.0.2.
*JDK 1.1 (February 1997): Introduced AWT event model, inner class, JavaBean, JDBC, and RMI.
*J2SE 1.2 (JDK 1.2) (December 1998): Re-branded as ’Java 2’ and renamed JDK to J2SE (Java 2 Standard Edition). Also released J2EE (Java 2 Enterprise Edition) and J2ME (Java 2 Micro Edition). Included JFC (Java Foundation Classes - Swing, Accessibility API, Java 2D, Pluggable Look & Feel, and Drag & Drop). Also introduced Collection Framework and JIT compiler.
*J2SE 1.3 (JDK 1.3) (May 2000): Introduced Hotspot JVM.
*J2SE 1.4 (JDK 1.4) (February 2002): Introduced assert statement, non-blocking IO (nio), logging API, image IO, Java webstart, regular expression (regex) support.
*J2SE 5.0 (JDK 5) (September 2004): Officially called 5.0 instead of 1.5 (by dropping the 1.). Introduced generics, autoboxing/unboxing, annotation, enum, varargs, for-each loop, static import. See ’JDK 5 New Features’.
*Java SE 6 (JDK 6) (December 2006): Renamed J2SE to Java SE (Java Platform Standard Edition). No new language features. See ’JDK 6 New Features’.
*Java SE 7 (JDK 7) (July 2011): First version after Oracle purchased Sun Microsystem - aslo called OracleJDK. Introduced Strings in switch statement, Binary integer literals, allowing underscores in numeric literals, improved type inference for generic instance creation (or diamond operator <>), Catching multiple exception types and rethrowing exceptions with improved type checking. See ’JDK 7 New Features’.
*Java SE 8 (JDK 8) (LTS) (March 2014): Included support for Lambda expressions, default and static methods in interfaces, improved collection, and JavaScript runtime. Also integrated JavaFX graphics subsystem. See ’JDK 8 New Features’.
*Java SE 9 (JDK 9) (September 21, 2017): Introduced modularization of the JDK (module) under project Jigsaw, the Java Shell (jshell), and more. See ’JDK 9 New Features’.
*Java SE 10 (18.3) (JDK 10) (March 2018): Introduced var for type inference local variable (similar to JavaScript). Introduced time-based release versioning with two releases each year, in March and September, denoted as YY.M. Removed native-header generation tool javah. See ’JDK 10 New Features’.
*Java SE 11 (18.9) (LTS) (JDK 11) (September 2018): Extended var to lambda expression. Standardize HTTP client in java.net.http. Support TLS 1.3. Clean up the JDK and the installation package (removed JavaFX, JavaEE, CORBA modules, deprecated Nashorn JavaScript engine). OracleJDK is no longer free for commercial use, but OpenJDK is still free. See ’JDK 11 New Features’.
*Java SE 12 (19.3) (JDK 12) (March 2019): Switch Expression (preview). See ’JDK 12 New Features’.
*Java SE 13 (19.9) (JDK 13) (September 2019): Switch Expression (preview), Multi-line Text Block (preview). See ’JDK 13 New Features’.
*Java SE 14 (20.3) (JDK 14) (March 2020): Records (preview)
*Java SE 15 (20.9) (JDK 15) (September 2020):How To Install JDK on WindowsStep 0: Un-Install Older Version(s) of JDK/JRE
I recommend that you install only the latest JDK. Although you can install multiple versions of JDK/JRE concurrently, it is messy.
If you have previously installed older version(s) of JDK/JRE, un-install ALL of them. Goto ’Control Panel’ ⇒ (optional) ’Programs’ ⇒ ’Programs and Features’ ⇒ Un-install ALL programs begin with ’Java’, such as ’Java SE Development Kit ..’, ’Java SE Runtime ..’, ’Java X Update ..’, and etc.Step 1: Download JDK
*Goto Java SE download site @ http://www.oracle.com/technetwork/java/javase/downloads/index.html.
*Under ’Java SE Downloads, Java Platform, Standard Edition’ ⇒ ’Java SE 15’ ⇒ Click the ’Oracle JDK Download’ link.
*Choose the JDK for your operating system, i.e., ’Windows’. Download the ’Windows x64 Installer’ (e.g., ’jdk-15.0.{x}_windows-x64_bin.exe’ - about 159MB), where {x} is a fast changing update number.Step 2: Install JDK
Run the downloaded installer (e.g., ’jdk-15.0.{x}_windows-x64_bin.exe’).
By default, JDK is installed in directory ’C:Program FilesJavajdk-15.0.{x}’, where {x} denotes the update number. Accept the defaults and follow the screen instructions to install JDK.
Use your ’File Explorer’, navigate to ’C:Program FilesJava’ to inspect the sub-directories. Take note of your JDK installed directoryjdk-15.0.{x}, in particular, the update number {x}, which you will need in the next step.
I shall refer to the JDK installed directory as <JAVA_HOME>, hereafter, in this article.Step 3: (SKIP and NOT NEEDED FOR JDK 15) Include JDK’s ’bin’ Directory in the PATH
Windows’ Command Prompt (CMD) searches the current directory and the directories listed in the PATHenvironment variable (or system variable) for executable programs. JDK’s programs (such as Java compiler ’javac.exe’ and Java runtime ’java.exe’) reside in the sub-directory ’bin’ of the JDK installed directory. You need to include JDK’s ’bin’ in the PATH to run the JDK programs.
To edit the PATH environment variable in Windows 10:
*Launch ’Control Panel’ ⇒ (Optional) ’System and Security’ ⇒ ’System’ ⇒ Click ’Advanced system settings’ on the left pane.
*Switch to ’Advanced’ tab ⇒ Click ’Environment Variables’ button.
*Under ’System Variables’ (the bottom pane), scroll down to select variable ’Path’ ⇒ Click ’Edit..’.
*For Newer Windows 10:
You shall see a TABLE listing all the existing PATH entries (if not, goto next step). Click ’New’ ⇒ Click ’Browse’ and navigate to your JDK’s ’bin’ directory, i.e., ’c:Program FilesJavajdk-15.0.{x}bin’, where {x} is your installation update number ⇒ Select ’Move Up’ to move this entry all the way to the TOP.
*For Older Windows 10 (Time to change your computer!):
(CAUTION: Read this paragraph 3 times before doing this step! Don’t push ’Apply’ or ’OK’ until you are 101% sure. There is no UNDO!!!)
(To be SAFE, copy the content of the ’Variable value’ to Notepad before changing it!!!)
In ’Variable value’ field, APPEND ’c:Program FilesJavajdk-15.0.{x}bin’ (where {x} is your installation update number) IN FRONT of all the existing directories, followed by a semi-colon (;) to separate the JDK’s bin directory from the rest of the existing directories. DO NOT DELETE any existing entries; otherwise, some existing applications may not run.
Note: If you have started CMD, you need to re-start for the new environment settings to take effect.Step 4: Verify the JDK Installation
Launch a CMD via one of the following means:
*Click ’Search’ button ⇒ Type ’cmd’ ⇒ Choose ’Command Prompt’, or
*Right-click ’Start’ button ⇒ run.. ⇒ enter ’cmd’, or
*Click ’Start’ button ⇒ Windows System ⇒ Command Prompt
Issue the following commands to verify your JDK installation:
*(Skip and NOT needed for JDK 15) Issue ’path’ command to list the contents of the PATH environment variable. Check to make sure that your JDK’s ’bin’ is listed in the PATH.
*Issue the following commands to verify that JDK/JRE are properly installed and display their version: Step 5: Write a Hello-World Java Program
*Create a directory to keep your works, e.g., ’d:myProject’ or ’c:myProject’. Do NOT save your works in ’Desktop’ or ’Documents’ as they are hard to locate. The directory name shall not contain blank or special characters. Use meaningful but short name as it is easier to type.
*Launch a programming text editor (such as TextPad, NotePad++, Sublime Text, Atom). Begin with a new file and enter the following source code. Save the file as ’Hello.java’, under your work directory (e.g., d:myProject). Step 6: Compile and Run the Hello-World Java Program
To compile the source code ’Hello.java’:
*Start a CMD Shell (Search ⇒ enter ’cmd’ ⇒ select ’Command Prompt’).
*Set the Current Drive to the drive where you saved your source file ’Hello.java’.
If you use drive ’c’, skip this step.
Else if you use drive ’d’, enter ’d:’ as follow:
*Set the Current Working Directory to the directory that you saved your source file via the cd (Change Directory) command. For example, suppose that your source file is saved in directory ’myProject’.
*Issue a dir (List Directory) command to confirm that your source file is present in the current directory.
*Invoke the JDK compiler ’javac’ to compile the source code ’Hello.java’. The compilation is successful if the command prompt returns. Otherwise, error messages would be shown. Correct the errors in your source file and re-compile. Check ’Common JDK Installation Errors’, if you encounter problem compiling your program.
*The output of the compilation is a Java class called ’Hello.class’. Issue a dir (List Directory) command again to check for the output.
To run the program, invoke the Java Runtime ’java’:
Everything that can possibly go wrong will go wrong: Read ’JDK Installation Common Errors’.Step 7: (For Advanced Users Only) JDK’s Source Code
Source code for JDK is provided and kept in ’<JAVA_HOME>libsrc.zip’ (or ’<JAVA_HOME>src.zip’ prior to JDK 9). I strongly recommend that you to go through some of the source files such as ’String.java’, ’Math.java’, and ’Integer.java’, under ’javalang’, to learn how experts program.How to Install JDK on macOSStep 1: Check if JDK has been Pre-Installed
To check if JDK has been installed, open a ’Terminal’ (Search ’Terminal’; or Finder ⇒ Go ⇒ Utilities ⇒ Terminal) and issue this command:
*If a JDK version number is returned (e.g., JDK x.x.x), then JDK has already been installed. If the JDK version is prior to 1.8, proceed to Step 2 to install the latest JDK; otherwise, proceed to ’Step 3: Write a Hello-world Java program’.
* If message ’command not found’ appears, JDK is NOT installed. Proceed to the ’Step 2: Install JDK’.
*If message ’To open javac, you need a Java runtime’ appears, select ’Install’ and follow the instructions to install JDK. Then, proceed to ’Step 3: Write a Hello-world Java program’.Step 2: Download JDK
*Goto Java SE download site @ http://www.oracle.com/technetwork/java/javase/downloads/index.html.
*Under ’Java SE Downloads, Java Platform, Standard Edition’ ⇒ ’Java SE 15’ ⇒ Click the ’Oracle JDK’ ’Download’ link.
*Choose the JDK for your operating platform, i.e., macOS. Download the macOS DMG installer (e.g, jdk-15.0.{x}_osx-x64_bin.dmg - about 172MB, where {x} is a fast changing update number).Step 3: Install JDK/JRE
*Double-click the downloaded Disk Image (DMG) file. Follow the screen instructions to install JDK/JRE.
*Eject the DMG file.
*To verify your installation, open a ’Terminal’ and issue these commands. Step 3: Write a Hello-World Java Program
*Create a directory called ’myProject’ under your home directory (Launch ’Finder’ ⇒ ’Go’ ⇒ ’Home’; Select ’File’ ⇒ ’New Folder’ ⇒ ’myProject’).
In macOS, the home directory of the current user can be referenced as ’~’. Hence, this new directory can be referenced as ’~/myProject’.
*Use a programming text editor (such as Sublime Text or Atom) to input the following source code and save as ’Hello.java’ under the directory ’~/myProject’.
(If you use macOS’s default text editor ’TextEdit’ (NOT recommended), you need to open a new file ⇒ choose ’Format’ ⇒ ’Make Plain Text’ ⇒ Enter the source code ⇒ Save as ’Hello.java’.) Step 4: Compile and Run the Hello-World Java Program
*To compile the source code ’Hello.java’, open a new ’Terminal’ (’Go’ ⇒ ’Utilities’ ⇒ ’Terminal’) and issue these commands (as illustrated):
*To run the Hello-world, invoke the Java Runtime ’java’ as follows: How to Install JDK on Ubuntu
There are several JDK implementations available for Linux, such as Oracle JDK, OpenJDK, Sun JDK, IBM JDK and GNU Java Compiler. We shall choose the Oracle JDK 8. Ubuntu chooses OpenJDK as its default JDK, which is not 100% compatible with Oracle JDK.Step 0: Check if JDK has already been Installed
Open a Terminal and issue this command:
If a JDK version number (e.g., ’javac x.x.x’) appears, JDK has already been installed. You can skip the installation and goto step 2.
To remove OpenJDK, issue command:Step 1: Download and Install JDK
*Goto JDK (Java SE) download site @ http://www.oracle.com/technetwork/java/javase/downloads/index.html. Under ’Java Platform, Standard Edition’ ⇒ ’Java SE 11.0.{x}’ ⇒ Click JDK’s ’Download’ ⇒ Under ’Java SE Development Kit 11.0.{x}’ ⇒ Check ’Accept License Agreement’ ⇒ Select ’Linux’, ’tar.gz’ package, (e.g., ’jdk-15.0.{x}-linux-x64_bin.tar.gz’ - 171MB).
The tarball will be downloaded in directory ’~/Downloads’, by default.
*We shall install JDK under ’/usr/local/java’ (or Ubuntu’s default JDK directory /usr/lib/jvm; or /opt/java). First, create a directory ’java’ under ’/usr/local’. Open a Terminal and issue these commands: Extract the downloaded package (Check your downloaded filename!) JDK shall be extracted in a folder ’/usr/local/java/jdk-15.0.{x}’, where {x} is the update number.
*Inform the Ubuntu to use this JDK/JRE: The above steps set up symlinks java, javac, javaws at /usr/bin (which is in the PATH), that link to /etc/alternatives and then to JDK bin directory.
The ’alternatives’ system aims to resolve the situation where several programs fulfilling the same function (e.g., different version of JDKs). It sets up symlinks thru /etc/alternatives to refer to the actual programs to be used.
Alternatively, you can include the JDK’s bin and JRE’s bin into the PATH directly.
*To verify the JDK installation, issue these commands:
*[Don’t Do this step - It is taken care by ’alternative’ in Step 3. Keep here to show you how to set PATH.]
A
https://diarynote.indered.space
Downloading & Installing the JRE Installer on Windows platform:
OpKey Web supports Java 8 or above versions. JDK is a superset of JRE, and contains everything that is in JRE, plus tools such as the compilers and debuggers necessary for developing applets and applications. If you are installing JDK then you don’t need to install JRE separately.
You can download JRE 8 or above version and install it on your machine. The JRE Installer is located on the Java SE Runtime Environment 10 Downloads page.
*In a browser, go to the Java SE Runtime Environment 10 Downloads page.
The following JRE installers are available for you to download: https://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html
*Windows Offline:jre-10.interim.update.patch_windows-x64_bin.exe
*Download the JRE installer according to your requirement.
You can open the JRE 1.6.020 image file with Pacifist software and extract all the folders with the framework into the System Library Frameworks JavaVM.framework Versions folders. After that the JRE should appear in your Applications/Utilities/Java Preferences JRE selection menu, where you can switch between the running JRE’s. 1.6 The java formula is keg-only, which means it is installed in /usr/local/Cellar but not linked into places like /usr/local/bin or /Library/Java/JavaVirtualMachines/ (macOS /usr/bin/java wrapper). For macOS /usr/bin/java wrapper to find the installed JDK, we manually create a symbolic link at /Library/Java/JavaVirtualMachines/. Many Adobe applications depend on the Oracle Java Runtime Environment (JRE) for some features to work. Apple recently changed the way it includes Java in Mac OS, and with Lion, Java is no longer preinstalled. It is now an optional install that you must select.
Note:
The Windows Offline installer and Windows installer contains everything that is required to install the JRE. The Microsoft Windows Installer (MSI) Enterprise JRE Installer is also available, which enables you to install the JRE across your enterprise. It requires a commercial license for use in production.
Downloading the JRE Installer
*Open Java SE Runtime Environment Downloads page.
*Click Accept License Agreement, and then, under the Downloads menu, click the link that corresponds to the installer for your version of Windows.
*Note the file size specified on the download page and, after the download has completed, verify that you have downloaded the complete file.
Running the JRE Installer
You must have Administrative privileges in order to install the JRE on Microsoft Windows.
Start the JRE 8 Installer by double-clicking the installer’s icon or file name in the download location.
Installation wizard shows some important information. Click OK to proceed installation.
JRE Installation is in progress.
You get following message once JRE gets installed successfully on your Windows machine.
JRE 8 has been installed on your machine successfully. Further, you need to configure Path of Environment Variable.Configuration of Java Environment Variable Path:
Before you start working on OpKey Web, need to setup Java Environment Variable path on that machine by following below steps:
*Select Control Panel and then System.
*Click Advanced system settings.
*Navigate to the Advanced tab and click on Environment Variables.
*Go to the System Variables tab and click on New.
*Enter JAVA_HOME as Variable Name and the Path of installed JDK as Variable Value.
*Click on OK. Close other windows while clicking OK.
Java Variable path has been configured successfully.How to check Java Version installed on your Windows machine?
You can easily check the version of Java installed on your machine. Follow the below given instructions:
*Open command prompt (Press Windows with R & type CMD).
*Type Java -version and press enter.
*Java Version installed on the machine can be viewed easily.How to check Java Version installed on your Mac machine?
You can easily check the version of Java installed on your machine. Follow the below given instructions:
(A) If JDK is installed on your Mac machine then you should follow the below given steps:
*Open Terminal on your Mac machine.
*Type Java -version command and press enter.
*Java Version installed on the machine can be viewed easily.
(B) If only JRE is installed on your Mac machine then you should follow the below given steps:
*Open Terminal on your Mac machine.
*Type following command and press Enter:
/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java -version
*Java Version installed on the machine can be viewed easily.
The Java Development Kit (JDK), officially named ’Java Platform Standard Edition’ or ’Java SE’, is needed for writing Java programs. The JDK is freely available from Sun Microsystems (now part of Oracle). The mother site for JDK (Java SE) is http://www.oracle.com/technetwork/java/javase/overview/index.html.’JDK’ or ’JRE’?
JRE (Java Runtime) is needed for running Java programs. JDK (Java Development Kit), which includes JRE plus the development tools (such as compiler and debugger), is need for writing as well as running Java programs. In other words, JRE is a subset of JDK. Since you are supposed to write Java Programs, you should install JDK, which includes JRE.JDK Versions
Reference: ’Java Version History’ @ https://en.wikipedia.org/wiki/Java_version_history.
*JDK Alpha and Beta (1995): Sun Microsystem announced Java in September 23, 1995.
*JDK 1.0 (January 1996): Originally called Oak (named after the oak tree outside James Gosling’s office). Renamed to Java 1 in JDK 1.0.2.
*JDK 1.1 (February 1997): Introduced AWT event model, inner class, JavaBean, JDBC, and RMI.
*J2SE 1.2 (JDK 1.2) (December 1998): Re-branded as ’Java 2’ and renamed JDK to J2SE (Java 2 Standard Edition). Also released J2EE (Java 2 Enterprise Edition) and J2ME (Java 2 Micro Edition). Included JFC (Java Foundation Classes - Swing, Accessibility API, Java 2D, Pluggable Look & Feel, and Drag & Drop). Also introduced Collection Framework and JIT compiler.
*J2SE 1.3 (JDK 1.3) (May 2000): Introduced Hotspot JVM.
*J2SE 1.4 (JDK 1.4) (February 2002): Introduced assert statement, non-blocking IO (nio), logging API, image IO, Java webstart, regular expression (regex) support.
*J2SE 5.0 (JDK 5) (September 2004): Officially called 5.0 instead of 1.5 (by dropping the 1.). Introduced generics, autoboxing/unboxing, annotation, enum, varargs, for-each loop, static import. See ’JDK 5 New Features’.
*Java SE 6 (JDK 6) (December 2006): Renamed J2SE to Java SE (Java Platform Standard Edition). No new language features. See ’JDK 6 New Features’.
*Java SE 7 (JDK 7) (July 2011): First version after Oracle purchased Sun Microsystem - aslo called OracleJDK. Introduced Strings in switch statement, Binary integer literals, allowing underscores in numeric literals, improved type inference for generic instance creation (or diamond operator <>), Catching multiple exception types and rethrowing exceptions with improved type checking. See ’JDK 7 New Features’.
*Java SE 8 (JDK 8) (LTS) (March 2014): Included support for Lambda expressions, default and static methods in interfaces, improved collection, and JavaScript runtime. Also integrated JavaFX graphics subsystem. See ’JDK 8 New Features’.
*Java SE 9 (JDK 9) (September 21, 2017): Introduced modularization of the JDK (module) under project Jigsaw, the Java Shell (jshell), and more. See ’JDK 9 New Features’.
*Java SE 10 (18.3) (JDK 10) (March 2018): Introduced var for type inference local variable (similar to JavaScript). Introduced time-based release versioning with two releases each year, in March and September, denoted as YY.M. Removed native-header generation tool javah. See ’JDK 10 New Features’.
*Java SE 11 (18.9) (LTS) (JDK 11) (September 2018): Extended var to lambda expression. Standardize HTTP client in java.net.http. Support TLS 1.3. Clean up the JDK and the installation package (removed JavaFX, JavaEE, CORBA modules, deprecated Nashorn JavaScript engine). OracleJDK is no longer free for commercial use, but OpenJDK is still free. See ’JDK 11 New Features’.
*Java SE 12 (19.3) (JDK 12) (March 2019): Switch Expression (preview). See ’JDK 12 New Features’.
*Java SE 13 (19.9) (JDK 13) (September 2019): Switch Expression (preview), Multi-line Text Block (preview). See ’JDK 13 New Features’.
*Java SE 14 (20.3) (JDK 14) (March 2020): Records (preview)
*Java SE 15 (20.9) (JDK 15) (September 2020):How To Install JDK on WindowsStep 0: Un-Install Older Version(s) of JDK/JRE
I recommend that you install only the latest JDK. Although you can install multiple versions of JDK/JRE concurrently, it is messy.
If you have previously installed older version(s) of JDK/JRE, un-install ALL of them. Goto ’Control Panel’ ⇒ (optional) ’Programs’ ⇒ ’Programs and Features’ ⇒ Un-install ALL programs begin with ’Java’, such as ’Java SE Development Kit ..’, ’Java SE Runtime ..’, ’Java X Update ..’, and etc.Step 1: Download JDK
*Goto Java SE download site @ http://www.oracle.com/technetwork/java/javase/downloads/index.html.
*Under ’Java SE Downloads, Java Platform, Standard Edition’ ⇒ ’Java SE 15’ ⇒ Click the ’Oracle JDK Download’ link.
*Choose the JDK for your operating system, i.e., ’Windows’. Download the ’Windows x64 Installer’ (e.g., ’jdk-15.0.{x}_windows-x64_bin.exe’ - about 159MB), where {x} is a fast changing update number.Step 2: Install JDK
Run the downloaded installer (e.g., ’jdk-15.0.{x}_windows-x64_bin.exe’).
By default, JDK is installed in directory ’C:Program FilesJavajdk-15.0.{x}’, where {x} denotes the update number. Accept the defaults and follow the screen instructions to install JDK.
Use your ’File Explorer’, navigate to ’C:Program FilesJava’ to inspect the sub-directories. Take note of your JDK installed directoryjdk-15.0.{x}, in particular, the update number {x}, which you will need in the next step.
I shall refer to the JDK installed directory as <JAVA_HOME>, hereafter, in this article.Step 3: (SKIP and NOT NEEDED FOR JDK 15) Include JDK’s ’bin’ Directory in the PATH
Windows’ Command Prompt (CMD) searches the current directory and the directories listed in the PATHenvironment variable (or system variable) for executable programs. JDK’s programs (such as Java compiler ’javac.exe’ and Java runtime ’java.exe’) reside in the sub-directory ’bin’ of the JDK installed directory. You need to include JDK’s ’bin’ in the PATH to run the JDK programs.
To edit the PATH environment variable in Windows 10:
*Launch ’Control Panel’ ⇒ (Optional) ’System and Security’ ⇒ ’System’ ⇒ Click ’Advanced system settings’ on the left pane.
*Switch to ’Advanced’ tab ⇒ Click ’Environment Variables’ button.
*Under ’System Variables’ (the bottom pane), scroll down to select variable ’Path’ ⇒ Click ’Edit..’.
*For Newer Windows 10:
You shall see a TABLE listing all the existing PATH entries (if not, goto next step). Click ’New’ ⇒ Click ’Browse’ and navigate to your JDK’s ’bin’ directory, i.e., ’c:Program FilesJavajdk-15.0.{x}bin’, where {x} is your installation update number ⇒ Select ’Move Up’ to move this entry all the way to the TOP.
*For Older Windows 10 (Time to change your computer!):
(CAUTION: Read this paragraph 3 times before doing this step! Don’t push ’Apply’ or ’OK’ until you are 101% sure. There is no UNDO!!!)
(To be SAFE, copy the content of the ’Variable value’ to Notepad before changing it!!!)
In ’Variable value’ field, APPEND ’c:Program FilesJavajdk-15.0.{x}bin’ (where {x} is your installation update number) IN FRONT of all the existing directories, followed by a semi-colon (;) to separate the JDK’s bin directory from the rest of the existing directories. DO NOT DELETE any existing entries; otherwise, some existing applications may not run.
Note: If you have started CMD, you need to re-start for the new environment settings to take effect.Step 4: Verify the JDK Installation
Launch a CMD via one of the following means:
*Click ’Search’ button ⇒ Type ’cmd’ ⇒ Choose ’Command Prompt’, or
*Right-click ’Start’ button ⇒ run.. ⇒ enter ’cmd’, or
*Click ’Start’ button ⇒ Windows System ⇒ Command Prompt
Issue the following commands to verify your JDK installation:
*(Skip and NOT needed for JDK 15) Issue ’path’ command to list the contents of the PATH environment variable. Check to make sure that your JDK’s ’bin’ is listed in the PATH.
*Issue the following commands to verify that JDK/JRE are properly installed and display their version: Step 5: Write a Hello-World Java Program
*Create a directory to keep your works, e.g., ’d:myProject’ or ’c:myProject’. Do NOT save your works in ’Desktop’ or ’Documents’ as they are hard to locate. The directory name shall not contain blank or special characters. Use meaningful but short name as it is easier to type.
*Launch a programming text editor (such as TextPad, NotePad++, Sublime Text, Atom). Begin with a new file and enter the following source code. Save the file as ’Hello.java’, under your work directory (e.g., d:myProject). Step 6: Compile and Run the Hello-World Java Program
To compile the source code ’Hello.java’:
*Start a CMD Shell (Search ⇒ enter ’cmd’ ⇒ select ’Command Prompt’).
*Set the Current Drive to the drive where you saved your source file ’Hello.java’.
If you use drive ’c’, skip this step.
Else if you use drive ’d’, enter ’d:’ as follow:
*Set the Current Working Directory to the directory that you saved your source file via the cd (Change Directory) command. For example, suppose that your source file is saved in directory ’myProject’.
*Issue a dir (List Directory) command to confirm that your source file is present in the current directory.
*Invoke the JDK compiler ’javac’ to compile the source code ’Hello.java’. The compilation is successful if the command prompt returns. Otherwise, error messages would be shown. Correct the errors in your source file and re-compile. Check ’Common JDK Installation Errors’, if you encounter problem compiling your program.
*The output of the compilation is a Java class called ’Hello.class’. Issue a dir (List Directory) command again to check for the output.
To run the program, invoke the Java Runtime ’java’:
Everything that can possibly go wrong will go wrong: Read ’JDK Installation Common Errors’.Step 7: (For Advanced Users Only) JDK’s Source Code
Source code for JDK is provided and kept in ’<JAVA_HOME>libsrc.zip’ (or ’<JAVA_HOME>src.zip’ prior to JDK 9). I strongly recommend that you to go through some of the source files such as ’String.java’, ’Math.java’, and ’Integer.java’, under ’javalang’, to learn how experts program.How to Install JDK on macOSStep 1: Check if JDK has been Pre-Installed
To check if JDK has been installed, open a ’Terminal’ (Search ’Terminal’; or Finder ⇒ Go ⇒ Utilities ⇒ Terminal) and issue this command:
*If a JDK version number is returned (e.g., JDK x.x.x), then JDK has already been installed. If the JDK version is prior to 1.8, proceed to Step 2 to install the latest JDK; otherwise, proceed to ’Step 3: Write a Hello-world Java program’.
* If message ’command not found’ appears, JDK is NOT installed. Proceed to the ’Step 2: Install JDK’.
*If message ’To open javac, you need a Java runtime’ appears, select ’Install’ and follow the instructions to install JDK. Then, proceed to ’Step 3: Write a Hello-world Java program’.Step 2: Download JDK
*Goto Java SE download site @ http://www.oracle.com/technetwork/java/javase/downloads/index.html.
*Under ’Java SE Downloads, Java Platform, Standard Edition’ ⇒ ’Java SE 15’ ⇒ Click the ’Oracle JDK’ ’Download’ link.
*Choose the JDK for your operating platform, i.e., macOS. Download the macOS DMG installer (e.g, jdk-15.0.{x}_osx-x64_bin.dmg - about 172MB, where {x} is a fast changing update number).Step 3: Install JDK/JRE
*Double-click the downloaded Disk Image (DMG) file. Follow the screen instructions to install JDK/JRE.
*Eject the DMG file.
*To verify your installation, open a ’Terminal’ and issue these commands. Step 3: Write a Hello-World Java Program
*Create a directory called ’myProject’ under your home directory (Launch ’Finder’ ⇒ ’Go’ ⇒ ’Home’; Select ’File’ ⇒ ’New Folder’ ⇒ ’myProject’).
In macOS, the home directory of the current user can be referenced as ’~’. Hence, this new directory can be referenced as ’~/myProject’.
*Use a programming text editor (such as Sublime Text or Atom) to input the following source code and save as ’Hello.java’ under the directory ’~/myProject’.
(If you use macOS’s default text editor ’TextEdit’ (NOT recommended), you need to open a new file ⇒ choose ’Format’ ⇒ ’Make Plain Text’ ⇒ Enter the source code ⇒ Save as ’Hello.java’.) Step 4: Compile and Run the Hello-World Java Program
*To compile the source code ’Hello.java’, open a new ’Terminal’ (’Go’ ⇒ ’Utilities’ ⇒ ’Terminal’) and issue these commands (as illustrated):
*To run the Hello-world, invoke the Java Runtime ’java’ as follows: How to Install JDK on Ubuntu
There are several JDK implementations available for Linux, such as Oracle JDK, OpenJDK, Sun JDK, IBM JDK and GNU Java Compiler. We shall choose the Oracle JDK 8. Ubuntu chooses OpenJDK as its default JDK, which is not 100% compatible with Oracle JDK.Step 0: Check if JDK has already been Installed
Open a Terminal and issue this command:
If a JDK version number (e.g., ’javac x.x.x’) appears, JDK has already been installed. You can skip the installation and goto step 2.
To remove OpenJDK, issue command:Step 1: Download and Install JDK
*Goto JDK (Java SE) download site @ http://www.oracle.com/technetwork/java/javase/downloads/index.html. Under ’Java Platform, Standard Edition’ ⇒ ’Java SE 11.0.{x}’ ⇒ Click JDK’s ’Download’ ⇒ Under ’Java SE Development Kit 11.0.{x}’ ⇒ Check ’Accept License Agreement’ ⇒ Select ’Linux’, ’tar.gz’ package, (e.g., ’jdk-15.0.{x}-linux-x64_bin.tar.gz’ - 171MB).
The tarball will be downloaded in directory ’~/Downloads’, by default.
*We shall install JDK under ’/usr/local/java’ (or Ubuntu’s default JDK directory /usr/lib/jvm; or /opt/java). First, create a directory ’java’ under ’/usr/local’. Open a Terminal and issue these commands: Extract the downloaded package (Check your downloaded filename!) JDK shall be extracted in a folder ’/usr/local/java/jdk-15.0.{x}’, where {x} is the update number.
*Inform the Ubuntu to use this JDK/JRE: The above steps set up symlinks java, javac, javaws at /usr/bin (which is in the PATH), that link to /etc/alternatives and then to JDK bin directory.
The ’alternatives’ system aims to resolve the situation where several programs fulfilling the same function (e.g., different version of JDKs). It sets up symlinks thru /etc/alternatives to refer to the actual programs to be used.
Alternatively, you can include the JDK’s bin and JRE’s bin into the PATH directly.
*To verify the JDK installation, issue these commands:
*[Don’t Do this step - It is taken care by ’alternative’ in Step 3. Keep here to show you how to set PATH.]
A
https://diarynote.indered.space
コメント