Book Image

Hands-On Artificial Intelligence with Java for Beginners

By : Nisheeth Joshi
Book Image

Hands-On Artificial Intelligence with Java for Beginners

By: Nisheeth Joshi

Overview of this book

Artificial intelligence (AI) is increasingly in demand as well as relevant in the modern world, where everything is driven by technology and data. AI can be used for automating systems or processes to carry out complex tasks and functions in order to achieve optimal performance and productivity. Hands-On Artificial Intelligence with Java for Beginners begins by introducing you to AI concepts and algorithms. You will learn about various Java-based libraries and frameworks that can be used in implementing AI to build smart applications. In addition to this, the book teaches you how to implement easy to complex AI tasks, such as genetic programming, heuristic searches, reinforcement learning, neural networks, and segmentation, all with a practical approach. By the end of this book, you will not only have a solid grasp of AI concepts, but you'll also be able to build your own smart applications for multiple domains.
Table of Contents (14 chapters)
Title Page
Copyright and Credits
Packt Upsell
Contributors
Preface
Index

Installing JDK and JRE


Since we will be coding in Java, we will need the Java Development Kit (JDK). JDK is an environment that comprises a compiler and an interpreter. The compiler is used to convert source code that is written in a high-level language into an intermediate form, which is byte code. That means that the JDK compiles the entire code and converts it into byte code. Once you have byte code, you need a Java interpreter, which is known as a Java Runtime Environment (JRE). JRE provides you with just the Java interpreter. If you have a JRE and byte code, you can run it on your system, as shown in the following diagram:

We will now download JDK onto our system.

 

 

Open your browser and go to the link https://www.oracle.com/technetwork/java/javase/downloads/index.html. Here, you will get an option to download Java. Currently, JDK 8 is supported by NetBeans. We have JDK 10, but it's not supporting NetBeans. If you don't have NetBeans in JDK, go to http://www.oracle.com/technetwork/java/javase/downloads/jdk-netbeans-jsp-142931.html. You have to accept the agreement, and based on your system, you can then download NetBeans and JDK, as shown in the following screenshot:

If you only want to install JDK, you have to go to JDK 8 at http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html. It will take you to the next page where you will also find more information about JDK 8, as follows:

Now, you have to accept the agreement again and download JDK according to your system requirements.

Once you have downloaded JDK, it is easy to install. For Windows and macOS, you just have to right-click on it. For Linux machines, you can either use a sudo or apt-get command on Ubuntu.