Coding
  • Welcome
  • Baisc Knowledge
    • Vim
    • C
      • Library
    • Java
      • Setup
      • Java Basic
  • Kattis
    • Easy
      • A Second Opinion
      • A Shortcut to What?
      • A Stack of Gold
      • ACM Contest Scoring
      • ASCII kassi
      • Aaah!
      • Add Two Numbers
      • Adding Trouble
      • Afjörmun
      • Airfare Grants
      • Above Average
      • Akcija
      • Alphabet Spam
      • Amerískur vinnustaður
      • Anti-Palindrome
      • Apaxiaaaaaaaaaaaans!
      • Arithmetic Functions
      • Arm Coordination
      • Arrangement
      • Attendance
      • Autori
      • Average Character
      • Avion
      • Baby Bites
      • Babylonian Numbers
      • ABC
      • Aldur
      • Backspace
      • Bannorð
      • Barcelona
      • Basketball One-on-One
      • Batter Up
      • Beavergnaw
      • Bela
      • BergMál
      • Bergur*
      • Akureyri*
      • Best Compromise
      • Best Relay Team*
      • Besta gjöfin
      • Betting
      • Bijele
      • Bilað Lyklaborð
      • Bitte ein Bit
      • Blandað Best
      • Blaðra
      • Blaðra2
      • Bluetooth*
      • Booking a Room
      • Bottle Opening
      • Bounding Robots
      • Breaking Branches*
      • Bracket Matching*
      • Broken Swords
      • Building Pyramids
      • Bus
      • Bus Assignment
      • CPR Number
      • Call for Problems
      • Canadians, eh?
      • Candy Store
      • Cetiri
      • Cetvrta
      • Champernowne Verification
      • Chanukah Challenge
      • Chardonnay
      • Chocolate Division*
      • Chugging
      • Cinema Crowds 2
      • Class Field Trip
      • ASCII Kassi 2
      • Coffee Cup Combo
      • Cold-puter Science
      • Composed Rhythms
      • Cookies
      • Cooking Water
      • Cornhusker
      • Cosmic Path Optimization
      • Count the Vowels
Powered by GitBook
On this page
  • Windows
  • Install JDK and JRE
  • Set Path
  • Ubuntu
  • Install JDK and JRE
  • Set Path
  • References
Edit on GitHub
  1. Baisc Knowledge
  2. Java

Setup

PreviousJavaNextJava Basic

Last updated 6 months ago

Windows

Install JDK and JRE

  1. Download the corresponding installer from .

  1. Execute Installer to install. Quite easy. Note that the installer will install both the JDK and the corresponding JRE.

Set Path

  1. Update the environment variables PATH. For me I just need to add C:\Program Files\Java\jdk-1.8\bin to my User variable.

Ubuntu

Install JDK and JRE

JDK

  1. Uncompress the .tar.gz using command tar zxvf your-name.tar.gz. Then move all the file to a new installation directory if you like. For me, it's /usr/lib/jvm/jdk-1.8-oracle-x64.

JRE

  1. Uncompress the file and move it to the installation directory. For me it's /usr/lib/jvm/jre-1.8-oracle-x64

Note that x64 can be replaced to your architecture.

Set Path

  1. Add this line to your ~/.bashrc (Note to change the directory to yours) \

    export PATH=/usr/lib/jvm/JDK-directory/bin:$PATH
  2. Reload using source ~/.bashrc

References

Download the corresponding file from . For Ubuntu users, please download the "Compressed Archive" File.

Download the corresponding "Compressed Archive" file from .

oracle
oracle
https://docs.oracle.com/javase/8/docs/technotes/guides/install/install_overview.html#A1097144
https://docs.oracle.com/cd/E19215-01/820-2215/6ndr6ai1m/index.html
https://media.pearsoncmg.com/ph/esm/ecs_liang_ijp_11/cw/content/supplements/Supplement1bInstallingJDK8.pdf
oracle