In this segment, you will learn about a basic software called the JDK. The JDK has to be installed on your system for any Java code to run on your computer. Let’s see what it contains that makes it a mandatory software to have on your system.
Before downloading any JDK version, you will need to create an account at Oracle at this page.
You can download the Java Development Kit or JDK from this page.
Once you click the link given, you will be directed to the download page where you'll see a list of options for download. Remember, here, you are downloading version 11 of Java. (We have made the user guide as per the latest available version i.e. JDK SE Development Kit 11.0.7.)
You will see a list of such options, where, for Windows, you need to click the link for the Windows x64(Windows x64 Installer) version, and for Mac, you need to click the link for the Mac OS X version
Now, you will hear Afra Ansaria, who is working at Upgrad as a Product Manager and a development professional. She began her career as a Software Engineer and has worked for companies such as Facebook and Qualcomm in the past. Afra will take you through most of the basic concepts and will demonstrate them along the way.
So, you learnt that the JDK contains the JRE and a Java compiler. The Java compiler converts the source code to a byte code. This byte code is converted to the final machine code by the JVM, which is contained by the JRE. You can read more about the JDK by accessing the link given here. We also discussed that a computer understands everything in machine language, and all the data on a computer is stored in the form of binary bits, i.e. 0 and 1. You can read more about binary bits on this page.
Hi. As we discussed, you need to give instructions to your computer in a stepbystep manner for it to perform a particular task. Giving such instructions in a particular language is known as programming. These instructions should be in a language a computer can understand. The computer understands everything only in machine language. Machine language consists of binary bits, that is, zero and one. Text, images, numbers are all stored and represented in zeros and ones in machine language. If you want to further read about how computers store everything in binary bits, you can refer to the links given below. Such a language is difficult for us humans to understand. Hence, we now have language such as Java, Python, C, C and Fortran that are closer to human languages. These languages use commands and syntax in the same way that vocabulary and grammar are used in the English language. Commands are written using English letters, while the usual symbols, including plus, minus, et cetera, are used for calculations. Instructions given in these languages are converted by a computer program to a machine language so that a computer can understand and execute them. If you join the dots here, you will see that writing instructions in such language is an example of abstraction where you give instructions and the computer executes them. You don't need to worry about how the computer is converting the high level language to the language it understands, that is machine language. Of all these high level languages discussed, you will learn to program in Java. We have chosen Java because once you're good at it, there are plenty of jobs waiting for you. Also, companies such as Google and Amazon all use Java for development purposes. And finally, most of Android apps are built in Java. So you can create and publish your app once you get the hang of it. But to start coding in Java, you need a tool called JDK. That is a Java development kit. It is a basic software that is required to develop Java programs. Let's see what JDK is in detail. Java is a widely used programming language. It is owned by Oracle, and anyone who wants to write programs in Java need to download the Java Development Kit from the Oracle website. JDK contains two important tools. JRE contains all the codes and instructions behind all of Java's inbuilt library variables and functions. Also, JRE contains JVM, which is Java virtual machine. This allows Java to run on any platform, or let's say it makes it platform independent. The second tool that JDK contains is the Java compiler, Java C. A compiler translates the programming language you are using to bytecode. This bytecode is not the final machine code, but an intermediate code which is then translated to machine code by the JVM. To learn more about JDK, you can refer to the text below. So once you install JDK, you have everything that needs to be there on your system to run the Java program to install it. You can follow the links and screenshots given below in the text. Now that you downloaded JDK, let's try to write Java programs. But where do you write them? Or how do you run them? The answers to these are on the way.
Programming involves giving step-by-step instructions to a computer in a language it can understand.
Machine language consists of binary bits, which are zeros and ones.
To make programming easier for humans, programming languages like Java, Python, C, C++, and Fortran have been developed.
These languages use English letters for commands and symbols for calculations.
Instructions given in high-level languages are converted to machine language using a computer program.
Java is a popular programming language used by companies like Google and Amazon, as well as for building Android apps.
To start coding in Java, you need to download the Java Development Kit (JDK) from the Oracle website.
The JDK contains the Java Runtime Environment (JRE), which includes all of Java's inbuilt library variables and functions, and the Java compiler (Java C).
The Java compiler translates the programming language to bytecode, which is then translated to machine code by the Java Virtual Machine (JVM).
Installing the JDK provides everything needed to run a Java program.
Links and screenshots are provided for installing the JDK.
Information on where to write and run Java programs is forthcoming.