Difference between revisions of "Install the Java Software Development Kit"

Kipkis (Kipkis | contribs)
(importing article from wikihow)
 
Kipkis (Kipkis | contribs)
m (Update ref tag)
Line 4: Line 4:
 
=== Downloading the Java Software Development Kit ===
 
=== Downloading the Java Software Development Kit ===
 
#Navigate to [http://www.oracle.com/technetwork/java/javase/downloads/index.html http://www.oracle.com/technetwork/java/javase/downloads/index.html]. You can download a simple Java Software Development Kit (JDK) installer for Windows, macOS, or Linux directly from Oracle.
 
#Navigate to [http://www.oracle.com/technetwork/java/javase/downloads/index.html http://www.oracle.com/technetwork/java/javase/downloads/index.html]. You can download a simple Java Software Development Kit (JDK) installer for Windows, macOS, or Linux directly from Oracle.
#Click the “Download” button beneath “JDK.” This will open a new page containing several download options.<ref>http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html</ref>
+
#Click the “Download” button beneath “JDK.” This will open a new page containing several download options.<ref name="rf1">http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html</ref>
#Scroll to the latest version of Java SE Development Kit. You should always use the latest stable version of the toolkit. There may be more than one version listed, so look closely at the release number.<ref>https://www3.ntu.edu.sg/home/ehchua/programming/howto/JDK_Howto.html</ref>
+
#Scroll to the latest version of Java SE Development Kit. You should always use the latest stable version of the toolkit. There may be more than one version listed, so look closely at the release number.<ref name="rf2">https://www3.ntu.edu.sg/home/ehchua/programming/howto/JDK_Howto.html</ref>
 
#* For example, if you are presented with JDK 8u101 and 8u102, choose 8u102.
 
#* For example, if you are presented with JDK 8u101 and 8u102, choose 8u102.
 
#Click “Accept License Agreement.” Before you can click the download link, you must accept the license agreement. The option is just beneath the JDK version number.
 
#Click “Accept License Agreement.” Before you can click the download link, you must accept the license agreement. The option is just beneath the JDK version number.
Line 11: Line 11:
 
#Install the JDK on your computer. See [[Install the Java Software Development Kit#Installing on macOS|Installing on macOS]], [[Install the Java Software Development Kit#Installing on Windows|Installing on Windows]], [[Install the Java Software Development Kit#Installing from an Archive on Linux#|Installing from an Archive on Linux or Solaris]], or [[Install the Java Software Development Kit#Installing from a Package on Linux|Installing from a Package on Linux]] for help installing the kit.
 
#Install the JDK on your computer. See [[Install the Java Software Development Kit#Installing on macOS|Installing on macOS]], [[Install the Java Software Development Kit#Installing on Windows|Installing on Windows]], [[Install the Java Software Development Kit#Installing from an Archive on Linux#|Installing from an Archive on Linux or Solaris]], or [[Install the Java Software Development Kit#Installing from a Package on Linux|Installing from a Package on Linux]] for help installing the kit.
 
=== Installing on macOS ===
 
=== Installing on macOS ===
#Double-click the installer file you downloaded. After [[Install the Java Software Development Kit#Downloading the Java Software Development Kit|downloading the Java Software Development Kit installer]], double-click the downloaded file in the Downloads window of your web browser or in Finder.<ref>http://docs.oracle.com/javase/7/docs/webnotes/install/mac/mac-jdk.html</ref>
+
#Double-click the installer file you downloaded. After [[Install the Java Software Development Kit#Downloading the Java Software Development Kit|downloading the Java Software Development Kit installer]], double-click the downloaded file in the Downloads window of your web browser or in Finder.<ref name="rf3">http://docs.oracle.com/javase/7/docs/webnotes/install/mac/mac-jdk.html</ref>
 
#Double-click the package icon to start the installer. This icon looks like an open box. The JDK installer will launch.
 
#Double-click the package icon to start the installer. This icon looks like an open box. The JDK installer will launch.
 
#Click “Continue” on the Introduction window. Now you’ll see the Installation Type window.
 
#Click “Continue” on the Introduction window. Now you’ll see the Installation Type window.
Line 25: Line 25:
 
=== Installing on Windows ===
 
=== Installing on Windows ===
 
#Double-click the JDK installer file. Once you’ve [[Install the Java Software Development Kit#Downloading the Java Software Development Kit|downloaded the Java Software Development Kit installer]],  navigate to the download location you chose earlier to launch the installer.
 
#Double-click the JDK installer file. Once you’ve [[Install the Java Software Development Kit#Downloading the Java Software Development Kit|downloaded the Java Software Development Kit installer]],  navigate to the download location you chose earlier to launch the installer.
#Allow the app to make changes to your computer. Depending on your version of Windows, you may be prompted to give permission for JDK to install. Click “Yes” or “OK” when prompted, and the installer’s Welcome screen will appear.<ref>https://www.youtube.com/watch?v=Wp6uS7CmivE</ref>
+
#Allow the app to make changes to your computer. Depending on your version of Windows, you may be prompted to give permission for JDK to install. Click “Yes” or “OK” when prompted, and the installer’s Welcome screen will appear.<ref name="rf4">https://www.youtube.com/watch?v=Wp6uS7CmivE</ref>
 
#Click “Next” to continue. Now you’ll move through a series of screens that will guide you through the JDK installation.
 
#Click “Next” to continue. Now you’ll move through a series of screens that will guide you through the JDK installation.
#Click “Next” to accept the default installation settings. This will begin the installation, which may take a few minutes depending on your computer. The green progress bar will show the progress of the installation.<ref>https://www.youtube.com/watch?v=cSRSlo4Hj2A</ref>
+
#Click “Next” to accept the default installation settings. This will begin the installation, which may take a few minutes depending on your computer. The green progress bar will show the progress of the installation.<ref name="rf5">https://www.youtube.com/watch?v=cSRSlo4Hj2A</ref>
 
#Click “Close” when the installation is complete. This button will not appear until the installer has finished.
 
#Click “Close” when the installation is complete. This button will not appear until the installer has finished.
#Press {{keypress|Win|X}} to launch the Power User menu. Now that the JDK is installed, you’ll need to tell Windows how to load it.<ref>https://www3.ntu.edu.sg/home/ehchua/programming/howto/JDK_Howto.html </ref> A menu will appear at the bottom left area of the screen.
+
#Press {{keypress|Win|X}} to launch the Power User menu. Now that the JDK is installed, you’ll need to tell Windows how to load it.<ref name="rf6">https://www3.ntu.edu.sg/home/ehchua/programming/howto/JDK_Howto.html </ref> A menu will appear at the bottom left area of the screen.
#Click “System.” A screen with your system specs will appear.<ref>https://www3.ntu.edu.sg/home/ehchua/programming/howto/JDK_Howto.html</ref>
+
#Click “System.” A screen with your system specs will appear.<ref name="rf2" />
 
#Click the “Advanced System Settings” link. Now you’ll see the System Properties panel.
 
#Click the “Advanced System Settings” link. Now you’ll see the System Properties panel.
 
#Navigate to the “Advanced” tab. You’ll see a few different areas where you can adjust various system settings.
 
#Navigate to the “Advanced” tab. You’ll see a few different areas where you can adjust various system settings.
#Click the “Environment Variables” button. This new dialog box displays two separate areas—one for User Variables (settings specific to your user account) and another for system-wide settings (System Variables).<ref>https://www3.ntu.edu.sg/home/ehchua/programming/howto/JDK_Howto.html</ref>
+
#Click the “Environment Variables” button. This new dialog box displays two separate areas—one for User Variables (settings specific to your user account) and another for system-wide settings (System Variables).<ref name="rf2" />
#Double-click the "Path" variable under “System Variables.” Now you’ll add a new variable. Follow these instructions exactly, as there is no “undo” option.<ref>https://www3.ntu.edu.sg/home/ehchua/programming/howto/JDK_Howto.html</ref>
+
#Double-click the "Path" variable under “System Variables.” Now you’ll add a new variable. Follow these instructions exactly, as there is no “undo” option.<ref name="rf2" />
 
#Click “New” if you’re using Windows 10. This step only applies to Windows 10:
 
#Click “New” if you’re using Windows 10. This step only applies to Windows 10:
 
#* Type <code>c:\Program Files\Java\jdk1.8.0_xx\bin</code> (but replace the “8.0_xx” part with the version number you installed).
 
#* Type <code>c:\Program Files\Java\jdk1.8.0_xx\bin</code> (but replace the “8.0_xx” part with the version number you installed).
Line 45: Line 45:
 
#* Click “OK.”
 
#* Click “OK.”
 
#Click “OK” until you’ve closed all open windows. The installation is complete.
 
#Click “OK” until you’ve closed all open windows. The installation is complete.
#Press {{keypress|Win|R}} to launch the Run box. Now you’ll check to make sure the JDK path is correct.<ref>https://www3.ntu.edu.sg/home/ehchua/programming/howto/JDK_Howto.html</ref>
+
#Press {{keypress|Win|R}} to launch the Run box. Now you’ll check to make sure the JDK path is correct.<ref name="rf2" />
 
#Type <code>cmd</code> and press {{keypress|Enter}}. Now you’ll see a terminal window containing the command prompt.
 
#Type <code>cmd</code> and press {{keypress|Enter}}. Now you’ll see a terminal window containing the command prompt.
 
#Type <code>path</code> and press {{keypress|Enter}}. You should see the full path to the JDK that you entered earlier.
 
#Type <code>path</code> and press {{keypress|Enter}}. You should see the full path to the JDK that you entered earlier.
Line 54: Line 54:
 
#* This method assumes you know how to use basic Unix shell commands.
 
#* This method assumes you know how to use basic Unix shell commands.
 
#* If you downloaded a .rpm package file instead of a tarball, see [[Install the Java Software Development Kit#Installing the JDK from a Package on Linux|Installing the JDK from a Package on Linux]].
 
#* If you downloaded a .rpm package file instead of a tarball, see [[Install the Java Software Development Kit#Installing the JDK from a Package on Linux|Installing the JDK from a Package on Linux]].
#Navigate to the directory where you'd like to install the JDK. You can install the JDK in any directory for which you have “write” permissions. Note that only the root user can install the JDK to a system directory.<ref>http://docs.oracle.com/javase/7/docs/webnotes/install/linux/linux-jdk.html</ref>
+
#Navigate to the directory where you'd like to install the JDK. You can install the JDK in any directory for which you have “write” permissions. Note that only the root user can install the JDK to a system directory.<ref name="rf7">http://docs.oracle.com/javase/7/docs/webnotes/install/linux/linux-jdk.html</ref>
 
#Move the *.tar.gz file to your current directory. Use the {{kbd|1=mv}} command to get the archive file into the correct directory.
 
#Move the *.tar.gz file to your current directory. Use the {{kbd|1=mv}} command to get the archive file into the correct directory.
#Unzip and install the JDK. The command is different depending on your operating system (and in the case of Solaris, the processor type). Once installed, a new directory called "jdk<version>” will be created in the current directory. In these examples, replace the name of the *.tar.gz file with the name of the one you downloaded.<ref>https://docs.oracle.com/javase/8/docs/technotes/guides/install/solaris_jdk.html</ref>
+
#Unzip and install the JDK. The command is different depending on your operating system (and in the case of Solaris, the processor type). Once installed, a new directory called "jdk<version>” will be created in the current directory. In these examples, replace the name of the *.tar.gz file with the name of the one you downloaded.<ref name="rf8">https://docs.oracle.com/javase/8/docs/technotes/guides/install/solaris_jdk.html</ref>
 
#* Linux: {{kbd|1=tar zxvf jdk-7u<version>-linux-i586.tar.gz}}
 
#* Linux: {{kbd|1=tar zxvf jdk-7u<version>-linux-i586.tar.gz}}
 
#* Solaris (SPARC): {{kbd|1=gzip -dc jdk-8uversion-solaris-sparcv9.tar.gz | tar xf -}}
 
#* Solaris (SPARC): {{kbd|1=gzip -dc jdk-8uversion-solaris-sparcv9.tar.gz | tar xf -}}
Line 62: Line 62:
 
#Delete the *.tar.gz file. Use the {{kbd|1=rm}} command to delete the archive file if you want to conserve disk space.
 
#Delete the *.tar.gz file. Use the {{kbd|1=rm}} command to delete the archive file if you want to conserve disk space.
 
=== Installing from a Package on Linux ===
 
=== Installing from a Package on Linux ===
#Become root. If you're using an RPM-based Linux system (such as SuSE or RedHat), you can install the Java Development Kit from an RPM package. Make sure you've downloaded the You'll need to su to root ({{kbd|1=su root}}) so that you have the correct permission to install the package.<ref> https://docs.oracle.com/javase/8/docs/technotes/guides/install/linux_jdk.html#BJFJHFDD</ref>
+
#Become root. If you're using an RPM-based Linux system (such as SuSE or RedHat), you can install the Java Development Kit from an RPM package. Make sure you've downloaded the You'll need to su to root ({{kbd|1=su root}}) so that you have the correct permission to install the package.<ref name="rf9"> https://docs.oracle.com/javase/8/docs/technotes/guides/install/linux_jdk.html#BJFJHFDD</ref>
 
#* The file you downloaded should end with ".rpm"
 
#* The file you downloaded should end with ".rpm"
 
#* This method assumes you know how to use basic Unix shell commands.
 
#* This method assumes you know how to use basic Unix shell commands.