GithubHelp home page GithubHelp logo

java-11's Introduction

Getting Started with Java SE 11

This repository is meant to give a quick run-down of all the features of Java SE 11 (including the concepts of Java 8)

Installing JDK on Windows / Mac

The JDK is a development environment for building applications, and components using the Java programming language. The JDK includes tools useful for developing & testing programs in Java. Oracle's OpenJDK (Java Development Kit) version 11 is available for free and can be downloaded from their website

Both Mac and Windows require administrator privileges to install the JDK.

The JDK is installed in the directory C:\Program Files\Java\jdk-11.i.u on Windows or on Mac, where i and u denote interim and update (followed by a patch number, if any)

Setting Environment Variables

Environment variables are dynamic and global, they are accessible by all processes of an Operating System, and thus are used in Java store the directories of the executable files like java.exe and javac.exe to avoid repetition of long commands. The variables required are:

  • JAVA_HOME
  • PATH
  • CLASSPATH

On Windows

  1. ⊞ Win + R opens the Run Window
  2. Type sysdm.cpl and Enter↵ or click OK
  3. Go to System Properties > Advanced > Environment Variables
  4. Click New and Enter the Variable Name as JAVA_HOME and set Variable value to C:\Program Files\Java\jdk-11.i.u
  5. Create new variables named PATH and CLASSPATH with values %JAVA_HOME%\bin and %JAVA_HOME%\lib respectively.

If you are installing a new version of Java (e.g. Migrating from Java 8 to 11), make sure that you completely uninstall the previous jdk versions and delete the folder ProgramData/Oracle/.. since this could cause the error The system cannot find the file C:\ProgramData\Oracle\Java\javapath\java.exe

On Mac

Temporary - Set for current session

  1. Shift ⇧ + ⌘ Command + U opens the Terminal
  2. Type export JAVA_HOME=/Library/Java/Home in the Terminal to set JAVA_HOME
  3. Type echo $JAVA_HOME to finalize set path

Permanent - Make path persist

  1. Open Terminal (Applications > Utilities > Terminal)
  2. Type emacs .profile and add the following at the end of the .profile file JAVA_HOME=/Library/Java/Home export JAVA_HOME;
  3. Save & Exit emacs (Ctrl+X, Ctrl+S; Ctrl+X, Ctrl+C)

Confirming Installed version of Java

Run the Command Prompt (on Windows) or Open the Terminal (on Mac), and enter java -version and your output should look similar to the following:

   java version "11.i.u" 20yy-mm-dd LTS
   Java(TM) SE Runtime Environment 18.9 (build 11.i.u+12-LTS)
   Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.i.u+12-LTS, mixed mode)

If the version shown is a version existing prior to 11, you will need to set the Environment Variables to the directory of the jdk-11 folder

If the CMD or Terminal output is similar to the above, Congratulations on successfully installing JDK on your machine! For any further clarification regarding the installation read through this once more or refer to the official Oracle documentation

java-11's People

Contributors

afrahaamer avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.