DSpace/C2/Installation-of-JDK-and-Build-tool-on-Windows-OS/English

From Script | Spoken-Tutorial
Revision as of 20:50, 13 January 2021 by Pravin1389 (Talk | contribs)

Jump to: navigation, search

Script: Install JDK and Build tools on Windows 10

Author : Pankaj Patil

Keywords: DSpace installation on Windows, Install JDK, install Java, install Maven, install Ant, install git, Set Environment variables, Set Path variables

Visual Cue Narration
Slide : Title Welcome to this spoken tutorial on Install JDK and Build tools on Windows 10.
Slide: Learning Objectives Slide In this tutorial, we will learn to
  • Install Java, Ant, Maven and git and
  • Set Environment variables for Java, Ant, and Maven
Slide: System requirements This tutorial is recorded using
  • Windows 10 64 bit OS
  • WordPad and
  • Firefox web browser

However you may use any other editor or web browser of your choice.

Slide: Pre-requisites To practice this tutorial,
  • You should have an internet connection to install the necessary packages
  • You should also have installed 7Zip file archiver
Slide: Pre-requisites

https://www.7-zip.org

  • If not, then download and install it using this URL.
Slide : Hardware requirements The minimum hardware requirements for DSpace installation are
  • i3 processor or above
  • 100GB hard disk or more
  • 4GB RAM or above
Slide : Code files
  • The commands used in this tutorial are in a file in the Code Files link on this tutorial page.
  • Please download and extract the file before practicing.
Switch to WordPad and open the file I have opened the commands file in WordPad editor on my machine.

And I will use the same file to copy-paste the commands during the demonstration.

The shortcut to paste on the Command Prompt is Ctrl and V keys.

Narration only To install DSpace, it is mandatory to have basic packages like Java, Ant, Maven and git.
Narration only Now, let us begin by installing the Java Development Kit.
Open web browser Open a web browser.
[Browser] Type:

https://www.oracle.com/in/java/technologies/javase/javase-jdk8-downloads.html

In the address bar, type the URL as shown to view JDK8 installers available from Oracle.
Locate and highlight

jdk-8u271-windows-x64.exe

Locate the installer file for Windows 64 bit.
Highlight u271 u271 in the installation file name, is the release number, which may be different in your case.
Highlight x64 x64 in the installation file name, indicates 64-bit operating system.
Slide: Installer for 32 bit Windows OS If you are using a 32-bit operating system, then you should download the installer for 32-bit OS.
Switch back to browser Switch back to the browser.
Click on the link jdk-8u271-windows-x64.exe My machine is a 64-bit OS.

So, I will download jdk-8u271-windows-x64.exe.

Point to Pop-up window A pop-up window opens up to accept the license agreement.
Check the checkbox of license agreement

Click on the button Download jdk-8u271-windows-x64.exe

Check the checkbox of the license agreement.

And click on the button Download jdk-8u271-windows-x64.exe

Point to Oracle sign in We will be redirected to the Oracle login page.
Only Narration If you do not have an Oracle account, please create an account and then log into Oracle.
Enter Username : dspace.u1@gmail.com

Password: **********

I will enter the username and password of my Oracle account.
Click on the Save file If prompted, click on the Save file button to download the installer.
Point to downloading of jdk-8u271-windows-x64.exe The installation file will get downloaded in the default downloads directory.
Open Downloads folder Go to the place where you have downloaded the file on your machine.

In my case it is in the Downloads folder.

Double click on jdk-8u271-windows-x64.exe Double-click on the jdk-8u271-windows-x64.exe, to begin the installation.
Click on Yes In the User Account Control dialog box, click on the Yes or Run button.
Click Next button In the Setup dialog box, click the Next button to continue the installation process.
Point to Development Tools

Click Next button

In the Custom Setup page, ensure that Development Tools is selected for installation.

Click the Next button to continue.

Point to Install to: Another dialog box opens up to select the installation folder.
Point to C:\Program Files\Java\jre1.8.0_271 The installation path is set to C:\Program Files\Java\jre1.8.0_271.
Point to Change button If you wish to change the path, click on the Change button.

I don’t wish to change the path, so I will not be clicking.

Click Next button Click on the Next button to continue.
Narration only JDK installation has begun.
Narration only Installation is successfully completed now.
Click Close button Click on the Close button to close the dialog box.
Only Narration Now, let us install Apache Maven, which is used to build DSpace source code.
Switch back to browser Switch back to the browser.
[Browser] Type:

https://downloads.apache.org/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.zip

In the address bar type the URL as shown.

This will download Apache Maven 3.6.3

Select “Save File” -> OK If prompted, click on the Save file option and then on the OK button.
Switch back to Downloads folder Switch back to the Downloads folder.
Copy apache-maven-3.6.3-bin.zip file to C drive Copy the file apache-maven-3.6.3-bin.zip to C drive.
Click Continue If prompted, click on Continue to provide administrator permissions for copying.
Right click on

apache-maven-3.6.3-bin zip -> 7-Zip

Select Extract Here

Right-click on the file apache-maven-3.6.3-bin zip

From the context menu, select 7-Zip

Then from the sub-menu, select Extract Here.

Narration only The file extraction begins.
Point to apache-maven-3.6.3 folder The zipped contents are extracted in the apache-maven-3.6.3 folder.
Double click on the apache-maven-3.6.3 folder Open the folder apache-maven-3.6.3 by double-clicking on it.
Point to path C:\apache-maven-3.6.3 The extracted contents bin, boot, conf, lib are located in the path C:\apache-maven-3.6.3.
Only Narration In case the contents are extracted to any other folder, move them to this folder.
Only Narration Next, we will install the Apache Ant tool, which is used to install DSpace.
[Browser] Type:

https://downloads.apache.org/ant/binaries/apache-ant-1.10.9-bin.zip

Switch back to the browser.

In the address bar type the URL as shown to download Apache Ant.

Select “Save File” -> OK If prompted, click on the Save file option and then on the OK button
Switch back to Downloads folder Switch back to the Downloads folder.
Copy and extract apache-ant-1.10.9-bin.zip file in C drive Like Maven, copy and extract the file apache-ant-1.10.9-bin.zip to C drive.
Point to path C:\apache-ant-1.10.9 Extracted contents bin, etc, lib, manual are located in the path C:\apache-ant-1.10.9.
Narration only Now let us set path variables for Java, Ant and Maven.
Go to This PC Go to My Computer or This PC.

Right-click on the empty area and select Properties.

Click on Advanced system settings Then click on the Advanced system settings from the left panel.
Point to the Advanced tab In the System Properties dialog box, make sure that the Advanced tab is selected.
Click Environment Variables button In the Advanced settings, click on the Environment Variables button.
Click New button In the Environment Variables dialog box, click on the New button in the User variable section.
Point to New User Variable dialog box New User Variable dialog box opens up.
Narration only Let us create a user variable for JDK.
Enter variable name as JAVA_HOME Type the variable name as JAVA_HOME.
Point to Variable value field

Point to Browse Directory button

Next let us type the value for the variable in the Variable value field.

We can do so by directly typing the path or by using the Browse Directory button.

Click on Browse Directory button

Point to Browse for Folder

I will click on the Browse Directory button.

Immediately the Browse for Folder dialog box opens up.

Browse to folder

This PC>> C drive >> Program Files>> Java >> jdk1.8.0_271

Browse to This PC, C drive, Program Files, Java, jdk1.8.0_271 directory.
Click OK button in Browse for Folder dialog box Then click the OK button in Browse for Folder dialog box.
Point to Variable value Observe that JDK installation path is shown in the Variable value.
Click OK button Click the OK button to save the variable.
Highlight MAVEN_HOME and ANT_HOME

MAVEN_HOME = C:\apache-maven-3.6.3

ANT_HOME= C:\apache-ant-1.10.9

Similarly, create MAVEN_HOME and ANT_HOME variables.

To do so, follow the steps used to create the JAVA_HOME variable.

Highlight values of MAVEN_HOME and ANT_HOME Ensure that correct installation paths are entered for Maven and Ant.
Narration only Now, let us set the Path variable in the System Variables section.
Select Path variable -> Click Edit button in System variable Select the Path variable in the System Variables section and click the Edit button.
Click New button in Edit Environment Variable dialog box In the Edit Environment Variable dialog box, click on the New button.
Point to text field A text field appears to set the path.
Enter C:\Program Files\Java\jdk1.8.0_271\bin Type the path of the JDK bin folder as shown.
Press Enter button Press the Enter button to save the variable.
Highlight Maven and Ant path

Maven path = C:\apache-maven-3.6.3\bin

Ant path = C:\apache-ant-1.10.9\bin

Similarly, set paths for Maven and Ant.
Click OK button Click the OK button to save the Path variable.
Click OK button in Environment Variable dialog box Now click the OK button in the Environment Variable dialog box.
Click OK button in System Properties window Then click the OK button in the System Properties window.
Close System window Close the System window.
Narration Only Now let us cross-verify the path variables set for JDK, Ant and Maven.
Type cmd in search box of taskbar Go to the search bar located at the bottom left of the taskbar.

Then type cmd.

Click on Command Prompt Click on the Command Prompt application.
Only Narration Here onwards please remember to press the Enter key after typing each command.
[Command Prompt] Type:

java -version

In the prompt, type the command

java –version

This will display the version of JDK which is installed on our machine.

[Command Prompt] Type:

ant -version

Then, Type the command

ant –version

This will display the version of Ant which is installed on our machine.

[Command Prompt] Type:

mvn -version

Type the command

mvn –version

This will display the version of Maven which is installed on our machine.

Only Narration So, we have installed and set the Environment Variables for Java, Ant and Maven.
Slide : Troubleshoot path variable If JDK, Maven and Ant versions are not shown then recheck the following:
  • Location of the Installation folders and
  • Path variables set in Environment Variables
Only narration Next, let us install the git version control system.
Switchback to browser Switch back to browser.
[Browser] Type:

https://git-scm.com/downloads

In the address bar type the URL as shown to view available git downloads.
Click on Windows under Downloads section Under the Downloads section, click on Windows.
Click on the Save file When prompted, click on the Save file button to download the installer.

The download of Git installer begins.

Open Downloads folder Now, Go to the Downloads folder.
Double click on Git-2.29.2.2-64-bit.exe Double-click on Git-2.29.2.2-64-bit.exe to begin the installation.
Click on Yes In the User Account Control dialog box, click on Yes or Run button.
Click Next button In the Git Setup dialog box, click the Next button continuously 4 times.

Point to the drop down

The setup dialog box asks you to choose the default editor used by Git.

In the drop-down, make sure that “Use Vim as Git’s default Editor” is selected by default.

If not, select the same.

Click Next button repeatedly Then click on the Next button continuously to install with the default configuration.
Click Install button Lastly, click on the Install button.
Uncheck Checkbox of View release notes Once the installation is over, uncheck the checkbox of “View release notes”.
Click the Next button Then click on the Next or Finish button.
Only narration So now, git is installed on the system.
Restart the System Restart the system to bring all the configurations into effect.
Only narration With this we have installed and configured the required packages for DSpace installation.

Let us summarize.

Slide : Summary In this tutorial, we learnt to-
  • Install Java, Ant, Maven and git and
  • Set Environment Variables for Java, Ant, and Maven
Slide : About Spoken Tutorial project The video at the following link summarises the Spoken Tutorial project.

Please download and watch it.

Slide : Spoken Tutorial workshops The Spoken Tutorial Project team conducts workshops and gives certificates.

For more details, please write to us.

Slide: Answers for THIS Spoken Tutorial
  • Do you have questions in THIS Spoken Tutorial? Please visit this site.
  • Choose the minute and second where you have the question.
  • Explain your question briefly.
  • The Spoken Tutorial project will ensure an answer.
  • You will have to register to ask questions.
Slide : Forum for specific questions
  • The Spoken Tutorial forum is for specific questions on this tutorial.
  • Please do not post unrelated and general questions on them.
  • This will help reduce the clutter.
  • With less clutter, we can use these discussions as instructional material.
Slide: Acknowledgement -I Spoken Tutorial project is funded by Ministry of Education (MoE), Government of India.
Slide: Acknowledgement -II DSpace spoken tutorial series is funded by the National Virtual Library of India, Ministry of Culture, Government of India.
Narration only This script and video for this tutorial was contributed by Pankaj Patil from IIT Bombay.

And this is Nancy Varkey signing off. Thanks for joining.

Contributors and Content Editors

Pankajpatil694, Pravin1389