topics content@scaler.com
  • NEW!
    NEW!  Connect Ideas Across Notes
    Save time and share insights. With Paragraph Citation, you can quote others’ work with source info built in. If someone cites your note, you’ll see a card showing where it’s used—bringing notes closer together.
    Got it
      • Create new note
      • Create a note from template
        • Sharing URL Link copied
        • /edit
        • View mode
          • Edit mode
          • View mode
          • Book mode
          • Slide mode
          Edit mode View mode Book mode Slide mode
        • Customize slides
        • Note Permission
        • Read
          • Only me
          • Signed-in users
          • Everyone
          Only me Signed-in users Everyone
        • Write
          • Only me
          • Signed-in users
          • Everyone
          Only me Signed-in users Everyone
        • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invite by email
        Invitee

        This note has no invitees

      • Publish Note

        Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

        Your note will be visible on your profile and discoverable by anyone.
        Your note is now live.
        This note is visible on your profile and discoverable online.
        Everyone on the web can find and read all notes of this public team.

        Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

        Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

        Explore these features while you wait
        Complete general settings
        Bookmark and like published notes
        Write a few more notes
        Complete general settings
        Write a few more notes
        See published notes
        Unpublish note
        Please check the box to agree to the Community Guidelines.
        View profile
      • Commenting
        Permission
        Disabled Forbidden Owners Signed-in users Everyone
      • Enable
      • Permission
        • Forbidden
        • Owners
        • Signed-in users
        • Everyone
      • Suggest edit
        Permission
        Disabled Forbidden Owners Signed-in users Everyone
      • Enable
      • Permission
        • Forbidden
        • Owners
        • Signed-in users
      • Emoji Reply
      • Enable
      • Versions and GitHub Sync
      • Note settings
      • Note Insights New
      • Engagement control
      • Make a copy
      • Transfer ownership
      • Delete this note
      • Save as template
      • Insert from template
      • Import from
        • Dropbox
        • Google Drive
        • Gist
        • Clipboard
      • Export to
        • Dropbox
        • Google Drive
        • Gist
      • Download
        • Markdown
        • HTML
        • Raw HTML
    Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
    Create Create new note Create a note from template
    Menu
    Options
    Engagement control Make a copy Transfer ownership Delete this note
    Import from
    Dropbox Google Drive Gist Clipboard
    Export to
    Dropbox Google Drive Gist
    Download
    Markdown HTML Raw HTML
    Back
    Sharing URL Link copied
    /edit
    View mode
    • Edit mode
    • View mode
    • Book mode
    • Slide mode
    Edit mode View mode Book mode Slide mode
    Customize slides
    Note Permission
    Read
    Only me
    • Only me
    • Signed-in users
    • Everyone
    Only me Signed-in users Everyone
    Write
    Only me
    • Only me
    • Signed-in users
    • Everyone
    Only me Signed-in users Everyone
    Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    --- title: How to Install Java on Windows? - Scaler Topics description: This article by Scaler Topics covers a detail explanation of how to install Java in Windows. Read to know more. author: Aditi Patil category: Java --- :::section{.main} Before starting with writing code in java. It import to know how to install java in window 10. Java requires the Java Development Kit (JDK) for execution on Windows. The JDK, encompassing the Java Runtime Environment (JRE) and the Java Virtual Machine (JVM), is essential for running Java applications like Minecraft or developing complex projects. This guide outlines the steps to install JDK SE 16 on Windows 10, providing the necessary tools for Java development and execution. Prerequisites: * A system running Windows 10. * A network connection. * Administrator privileges. ::: :::section{.main} ## Check If Java Is Installed Having multiple Java versions on the same system can lead to conflicts, as applications might try to utilize different versions. Moreover, outdated versions can pose substantial security risks over time. Before proceeding to install java in windows, it's advisable to verify whether a Java version is already installed on Windows: * Type "cmd" in the Windows search bar. * Open the command prompt. * Execute the following command to check the Java version in Windows: java -version If the message says that Java is not recognized as an internal or external command, Java is not installed. If the system shows a Java version number, uninstall the previous Java installation before continuing. ::: :::section{.main} ## Which Java Distribution Do We Need? When selecting a Java Distribution, Oracle, Azul, Amazon, and Microsoft are among the companies that offer their Java installers based on the open-source OpenJDK project. Oracle is a reliable and widely used option. Oracle provides official Java installers and robust support for their JDK (Java Development Kit). This ensures a stable and well-maintained Java environment, making it a suitable choice for various development needs. :::section{.main} ## How To Install Java On Windows 10? To install Java in window, you should have to follow following steps: Step 1: Download Java for Windows Step 2: Run the Java Installer Step 3: Validate the JAVA_HOME setting Step 4: Confirm the Java PATH variable was set properly. Step 5: Run a JDK command to verify Java install was a success. **Step 1: Download Java for Windows** To download Java, you should have an account on oracle.com. You can sign in if you have one, or else you can sign up and create an account. Go to the site of `Java Oracle` using this [link](https://www.oracle.com/java/technologies/javase/jdk16-archive-downloads.html "{rel='nofollow'}") and download the latest version of `JDK 16` from `oracle.com` for windows. ![oracle window](https://scaler.com/topics/images/oracle-window.webp) ::: :::section{.tip} **NOTE:** Before downloading check whether your system is `32-bit or 64-bit` and download accordingly. In my case, it's `64-bit`. ::: :::section Clicking on the installation link will take you to a popup window as shown below. Click on I reviewed and accept the Oracle Technology Network License Agreement for `Oracle Java SE` development kit and click on the download button. It will take you to the login page of oracle.com, log in and start downloading the software. ![oracle login page](https://scaler.com/topics/images/oracle-login-page.webp) **Step 2: Run the Java Installer** Once the `JDK 16` download is complete, run the `.exe` file on windows to start install java in windows. First allow windows to make necessary changes during installation. ![allow changes](https://scaler.com/topics/images/allow-changes.webp) **Begin the installation by clicking on next.** ![begin the installation](https://scaler.com/topics/images/begin-the-installation.webp) **Step 3: Validate the JAVA_HOME setting** Select the PATH where you want to install Java in Windows. Leave it default and click on **Next**. ![default path](https://scaler.com/topics/images/default-path.webp) After installations are done, click on **Close**. ![done installation](https://scaler.com/topics/images/installation-done.webp) **Step 7: Confirm the Java PATH variable was set properly** After installing java in windows, we need to set environment variables PATH and CLASSPATH to run a program. `Path and Classpath` both are operating system level environment variables. `Path` is used to define where the system can find the `executables(.exe) files` and `classpath` is used to `specify the location of .class files. **PATH Variable:** * The `PATH variable` gives the location of executables like `javac and java` that are stored in the `bin folder` of Java. * When you try to execute a program from the command line, the operating system searches for the specified program in the current direction and executes if it's available. * In case the programs are not available in the current directory, the operating system verifies in the set of directories specified in the `‘PATH ’` environment variable. **CLASSPATH Variable:** * The `CLASSPATH` variable gives the location of library files that are stored in the `lib folder` of Java. * This environment variable is used to specify the location of the classes and packages. * When we try to import classes and packages that are not available in Java Standard Library. * JVM verifies the current direction for them, if not available it verifies the set of directories specified in the `CLASSPATH` environment variable. **To set these environment variables right-click on this PC and go to properties.** Click on Advanced System Settings. ![setting enviroment](https://scaler.com/topics/images/set-enviorment.webp) ![click advance](https://scaler.com/topics/images/click-advance.webp) Go to environment variables and click on **New**. Create a new PATH variable and set its path to the bin folder, which is in the installed JDK folder. ![enviroment variables](https://scaler.com/topics/images/go-to-enviroment-variables.webp) ![click new](https://scaler.com/topics/images/click-new.webp) ![create new path](https://scaler.com/topics/images/copy-address.webp) **Copy the address of the bin folder in JDK.** **Paste it in path variable value.** ![copy address for paste](https://scaler.com/topics/images/copy-address-for-paste.webp) ![paste in path](https://scaler.com/topics/images/paste-in-path.webp) Follow the same steps to create the CLASSPATH variable. Its variable value will be set to the lib folder in JDK. ![creating classpath](https://scaler.com/topics/images/creating-classpath.webp) The `PATH and CLASSPATH` variables are set. Click on **OK**. ![click ok](https://scaler.com/topics/images/click-ok.webp) **Here the installation of `JDK 16` is complete and environment variables are set.** **Step 5: Run a JDK command to verify Java install was a success.** After successfully installing java in windows all and setting all the changes, run the jdk command to verify java installed successfully or not. the easiest way to do this is to check the java version installed. ```java java -version ``` ::: :::section{.summary} ## Conclusion * Java needs JDK which is a superset of JRE and JVM to execute programs. * `javac` command is used to compile java code and ```java``` command is used to execute it. * `java` command activates JVM, which is responsible for executing java programs. * After successful installation, we need to set `environment` variables to execute java commands. :::

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password
    or
    Sign in via Google Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully