12
Installation guide for Java ACADGILD Page 1 Installation guide for Java Step by Step Guide

Installation guide for Java - Amazon S3 · Installation guide for Java A C A D G I L D Page 9 3. Under either "User variables" or "System variables", you should find "Path". Highlight

  • Upload
    others

  • View
    10

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Installation guide for Java - Amazon S3 · Installation guide for Java A C A D G I L D Page 9 3. Under either "User variables" or "System variables", you should find "Path". Highlight

Installation guide for Java

A C A D G I L D

Page 1

Installation guide for Java

Step by Step Guide

Page 2: Installation guide for Java - Amazon S3 · Installation guide for Java A C A D G I L D Page 9 3. Under either "User variables" or "System variables", you should find "Path". Highlight

Installation guide for Java

A C A D G I L D

Page 2

Installing Java, Android Studio

Table of Contents 1. Introduction .................................................................................................................................... 3

2. Minimum Requirements For Windows ........................................................................................... 4

3. Minimum Requirements For Mac ................................................................................................... 5

4. JAVA Installation on Windows ........................................................................................................ 5

4.1 STEP I - Un-Install Older Version(s) of JDK/JRE ....................................................................... 5

4.1.1 Download JDK ................................................................................................................. 5

4.1.2 Install JDK and JRE ........................................................................................................... 5

4.2 STEP II - How to set the Setting the PATH environment variable to run Java Version 7

Update 5 on Windows 7 ..................................................................................................................... 6

4.3 STEP III - INSTALL ECLIPSE IDE ............................................................................................... 10

5. JAVA Installation on MAC.............................................................................................................. 10

5.1 Step 1: Check if JDK has been Pre-Installed .......................................................................... 10

5.2 Step 2: Download and Install JDK.......................................................................................... 10

5.3 STEP 3 - To install Eclipse ...................................................................................................... 12

Page 3: Installation guide for Java - Amazon S3 · Installation guide for Java A C A D G I L D Page 9 3. Under either "User variables" or "System variables", you should find "Path". Highlight

Installation guide for Java

A C A D G I L D

Page 3

1. Introduction 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. Since you are supposed to write Java Programs, you should install JDK, which includes JRE.

JDK Versions The various JDK versions are:

1. JDK Alpha and Beta (1995): Sun announced Java in September 23, 1995.

2. JDK 1.0 (January 23, 1996): Originally called Oak (named after the oak tree outside James Gosling's office). Renamed to Java 1 in JDK 1.0.2.

3. JDK 1.1 (February 19, 1997): Introduced AWT event model, inner class, JavaBean,

JDBC, and RMI.

4. J2SE 1.2 (codename Playground) (December 8, 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 and Feel and Drag and Drop). Introduced Collection Framework and JIT compiler.

5. J2SE 1.3 (codename Kestrel) (May 8, 2000): Introduced Hotspot JVM.

6. J2SE 1.4 (codename Merlin) (February 6, 2002): Introduced assert, non-blocking IO (nio), logging API, image IO, Java webstart, regular expression support.

7. J2SE 5.0 (codename Tiger) (September 30, 2004): Officially called 5.0 instead of 1.5.

Introduced generics, autoboxing/unboxing, annotation, enum, varargs, for-each loop, static import.

8. Java SE 6 (codename Mustang) (December 11, 2006): Renamed J2SE to Java SE (Java

Standard Edition). 9. Java SE 7 (codename Dolphin) (July 28, 2011): First version after Oracle purchased

Sun (called Oracle JDK).

10. Java SE 8 (March 18, 2014): included support for Lambda expressions, default methods, and JavaScript runtime.

Page 4: Installation guide for Java - Amazon S3 · Installation guide for Java A C A D G I L D Page 9 3. Under either "User variables" or "System variables", you should find "Path". Highlight

Installation guide for Java

A C A D G I L D

Page 4

2. Minimum Requirements For Windows

You should meet the following minimum requirements:

Component Minimum

CPU 1 GHz or greater

Memory 1 GB (Minimum)

2GB (Recommended)

Hard Disk 16GB available disk space

Host OS Windows 7 Pro / Ultimate, Windows 8* / 8 Pro, Windows Server 2008 or greater

Page 5: Installation guide for Java - Amazon S3 · Installation guide for Java A C A D G I L D Page 9 3. Under either "User variables" or "System variables", you should find "Path". Highlight

Installation guide for Java

A C A D G I L D

Page 5

3. Minimum Requirements For Mac

You should meet the following minimum requirements:

Component Minimum

Memory 1 GB (Minimum)

2GB (Recommended)

Hard Disk 16GB available disk space

Host OS Any Intel-based computer running OS X 10.8 (Mountain Lion) or later.

Administrator privileges.

Note that installing the JDK on OS X is performed on a

system wide basis, for all users, and administrator

privileges are required. You cannot install Java for a

single user.

4. JAVA Installation on Windows

4.1 STEP I - Un-Install Older Version(s) of JDK/JRE

I recommend that you install the latest JDK, but it can be messy if you have multiple versions of JDK/JRE. If you have previously installed older version(s) of JDK/JRE, un-install ALL of them. Run "Control Panel" ⇒ Program and Features ⇒ Un-install programs begin with "Java", such as "Java SE Development Kit" and "Java SE Runtime". If you are not sure whether you have older version(s) of JDK, check!

4.1.1 Download JDK

1. Go to Java SE download site @ http://www.oracle.com/technetwork/java/javase/downloads/index.html.

2. Under "Java SE 8ux", click the "Download" button under "JDK".

3. Check "Accept License Agreement".

4. Choose your operating platform, e.g., Windows x86 for 32-bit Windows OS or

Windows x64 for 64-bit Windows OS. You can check whether your Windows OS is 32-bit or 64-bit via "Control Panel" ⇒ System ⇒ Under the "System Type".

4.1.2 Install JDK and JRE Run the downloaded installer (e.g., "jdk-8uxx-windows-x64.exe"), which installs both the

Page 6: Installation guide for Java - Amazon S3 · Installation guide for Java A C A D G I L D Page 9 3. Under either "User variables" or "System variables", you should find "Path". Highlight

Installation guide for Java

A C A D G I L D

Page 6

JDK (Java Development Kit) and JRE (Java Runtime). By default, the JDK will be installed in directory "C:\Program Files\Java\jdk1.7.0_xx", where xx denotes the latest upgrade number; and JRE in "C:\Program Files\Java\jre8". For novices, accept the defaults. Simply click "next"..."next"... to install JDK in "C:\Program Files\Java\jdk1.8.0_xx" and JRE in "C:\Program Files\Java\jre8".

Take note of your JDK installed directory (which you will need to use in the next step). Check the JDK installed directory by inspecting these folders using Windows Explorer.

4.2 STEP II - How to set the Setting the PATH environment variable to run

Java Version 7 Update 5 on Windows 7

1. Left-click on the Windows Explorer icon (the yellow folder on the toolbar at the

bottom of your computer screen. Then type this into the textbox at the top of the Windows Explorer window:

Control Panel\System and Security\System and then click enter.

Page 7: Installation guide for Java - Amazon S3 · Installation guide for Java A C A D G I L D Page 9 3. Under either "User variables" or "System variables", you should find "Path". Highlight

Installation guide for Java

A C A D G I L D

Page 7

And this window will now look something like this, Click "Advanced system settings" on the left of this window.

Page 8: Installation guide for Java - Amazon S3 · Installation guide for Java A C A D G I L D Page 9 3. Under either "User variables" or "System variables", you should find "Path". Highlight

Installation guide for Java

A C A D G I L D

Page 8

2. Then you will see this. Next, click on the "Environment Variables" button.

Page 9: Installation guide for Java - Amazon S3 · Installation guide for Java A C A D G I L D Page 9 3. Under either "User variables" or "System variables", you should find "Path". Highlight

Installation guide for Java

A C A D G I L D

Page 9

3. Under either "User variables" or "System variables", you should find "Path". Highlight this variable:

And then click "Edit..." The path will probably already be set to include several directories. Use the right arrow curser key to scroll to the end of the "Variable value:" textbox. Then type a semicolon at the end of the existing path, followed by the name of the java executable directory (either C:\Program Files (x86) \Java\jdk1.7.0_05\bin or C:\Program Files\Java\jdk1.7.0_05\bin, depending on whether you downloaded the 32-bit or 64-bit version of Java.

4. Click "OK" several times (in order to close all of the System windows) and then

restart your computer.

Page 10: Installation guide for Java - Amazon S3 · Installation guide for Java A C A D G I L D Page 9 3. Under either "User variables" or "System variables", you should find "Path". Highlight

Installation guide for Java

A C A D G I L D

Page 10

4.3 STEP III - INSTALL ECLIPSE IDE

I choose to use the Eclipse IDE for Java Developers (128mb). You can download it here

- Download "Eclipse IDE for Java Developers" from here http://www.eclipse.org/downloads/. You will receive a rar file in "~/Downloads" folder.

- This is a zip file and does not require installation. Just extract it.

- To start Eclipse, open the "eclipse" folder and click on the "Eclipse" icon.

Note : Make sure the JDK and Eclipse belongs to same bit version. If JDK is 64 bit then download eclipse also 64 bit. If JDK is 32 bit then download eclipse also 32 bit.

5. JAVA Installation on MAC

5.1 Step 1: Check if JDK has been Pre-Installed

In some Mac systems (earlier than Mac OS X 10.7 Lion), JDK has been pre-installed. To check if JDK has been installed, open a "Terminal" (Go ⇒ Utilities ⇒ Terminal) and issue these commands:

$ javac -version

If a JDK version number is returned (e.g., JDK 1.x.x), then JDK has already been

installed.

If message "command not found" appears, JDK is NOT installed. Proceed to the "Step 2:

Download and 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 "How to Install Eclipse on Mac".

5.2 Step 2: Download and Install JDK 1. Goto http://connect.apple.com. 2. Login with your AppleID. 3. Download "Java for Mac

Choose {10.x} according to your

OS X {10.x} Update {u} Developer Package (DMG)".

Mac OS X version and the latest {u}.

Page 11: Installation guide for Java - Amazon S3 · Installation guide for Java A C A D G I L D Page 9 3. Under either "User variables" or "System variables", you should find "Path". Highlight

Installation guide for Java

A C A D G I L D

Page 11

4. Double-click to install the downloaded Disk Image (DMG) file. 5. Eject the DMG file. 6. To verify your installation, open a "Terminal" and issue these

commands:

// Check the version of "javac" (Java Compiler) and "java" (Java

Runtime) $ javac -version javac 1.x.x_xx

$ java -version java version "1.x.x_xx"

Page 12: Installation guide for Java - Amazon S3 · Installation guide for Java A C A D G I L D Page 9 3. Under either "User variables" or "System variables", you should find "Path". Highlight

Course Name

A C A D G I L D

Page 12

Java(TM) SE Runtime Environment (build 1.x.x_xx-xxx) Java HotSpot(TM) Client VM (build 22.1-b02, mixed mode, sharing) // Find the location of programs "javac" (Java Compiler) and "java" (Java Runtime) $ which

javac /usr/bin/javac

$ which java /usr/bin/java

5.3 STEP 3 - To install Eclipse

1. Download Eclipse from http://www.eclipse.org/downloads/. Choose "Mac OS X" ⇒

"Eclipse IDE for Java Developers" (or "Eclipse Classic"). You will receive a TAR file (e.g., "eclipse-java-juno-SR1-macosx-cocoa-x86_64.tar.gz") in "~/Downloads" folder.

2. Double-click the downloaded TAR file to expand it into an folder called "eclipse".

3. Drag the expanded "eclipse" folder to the "Applications" folder.

To start Eclipse, open the "eclipse" folder and click on the "Eclipse" icon. You may drag the

"Eclipse" icon to the dock. Notes: To uninstall Eclipse, drag the "/Applications/eclipse" folder to trash.