Java 1 Assignment
Java 1 Assignment
Aim :- Study of different modern tools and Installation of JDK and Java
IDE, like Netbeans or Eclipse
1.1. Eclipse
2.1. Maven
Maven is both a build tool and a dependency management tool. Its configuration file is
‘pom.xml’ which lists project dependencies, where maven automatically downloads all the
dependencies from the repositories. Maven handles the building, reporting, as well as
documentation of the projects, it provides a lot of dependencies for the Java applications.
2.2. Gradle
Apart from what Maven offers, Gradle lets the developers create the custom build tasks
using Groovy. Gradle processes the build through a lifecycle that includes tasks like
initialization, configuration, and execution, whereas It fetches required libraries from
repositories like Maven Central or JCenter, or even custom repositories.
3.1. Git
Git is the Currently the most popular VCS, and platforms like GitHub, GitLab,
and Bitbucket are built around Git. It is mainly used to track changes in source code during
software development, allowing multiple developers to collaborate on a project.
Jenkins automates the building, testing, and deployment of applications. If you have a
web application, Jenkins can be set up to automatically deploy your application to a server
whenever you push your changes to your repository.
4.2. Travis CI
Travis CI Integrates with GitHub. When you submit a pull request on GitHub, Travis CI
can automatically run tests and report if they pass, and shows you that your working tree is
clean with nothing to push.
5. Testing Tools
Testing tools are the tools which support various types of testing, ranging from unit testing
to integration testing and beyond that build the test cases according to the boundary
conditions of your application. Some of the testing tools that are mentioned below.
5.1. JUnit
JUnit is used for writing and executing the unit tests in Java, it builds the test case as
per the application. Basically, JUnit is a tool in Java that lets developers write test cases to
check if their code works fine as expected. By using JUnit, you can quickly find mistakes
or issues in your code and fix them.
6.1. SonarQube
It checks the coding standards for the application, the refinement of the code, the clarity of
the code, potential bugs, and security vulnerabilities. It manages the code quality by
scanning your code to identify the bugs. For example: a part of your code that might break
because it’s looking for something that’s missing.
7. Application Profilers
The Application Profilers is the diagnostic tool which is designed to analyse the pattern of
Java applications, and monitors the runtime behaviour of your Java applications. It
identifies the performance bottleneck, memory leaks, thread contention, and there some
issues which can affect the efficiency as well as stability of the program. Some of the
profilers are describe below.
7.1. VisualVM
It tells how your Java application is running, showing metrics like memory usage and
active threads, and if your application is using an unexpected amount of
memory, VisualVM helps to identify the cause. It is a free tool that is bundled with the JDK
(Java Development Kit), that offers basic profiling capabilities for both local and remote
JVMs (Java Virtual Machine).
It is integrated into the NetBeans IDE, this tool provides CPU, memory, and thread
profiling capabilities.
8.1. Hibernate
It allows Java applications to interact with databases using objects instead of writing
complex SQL queries into the databases. For example: If you make a ‘User’ in
Java, Hibernate can directly put it into a “users” database section without you having to
type out detailed database commands.
JPA is a set of rules or guidelines that describe how Java objects should be stored, updated,
deleted, and retrieved from relational databases. It standardised the way, Java applications
interact with databases using ORM (Object-Relational Mapping).
Spring boot makes the development part easy for the Java techies, as it has user friendly
interface where developer, develops different kinds of microservices using the STS (Spring
Tool Suit) tool, and let services to communicate with each other by building the Eureka
Server, by using the Spring Boot developer can quickly set up the web server and can add
dependencies according to their requirements, and can define the endpoints or API into
their microservices for the Java application, and easily interact with the databases.
9.2. Tomcat
Tomcat is like a helper for Java websites. You give it your Java site, and Tomcat runs it for
you, and tomcat ensures it operates smoothly, managing user interactions and overseeing
the incoming and outgoing communications. Tomcat is like a manager for Java web apps,
where it runs properly, handling all the user interactions for you as well as it will handle the
requests and responses.
10.1. Kubernetes
Kubernetes is something which controls, and organizes the Docker containers. Suppose, if
you have an online application that gets busy having load of traffic, or quiet based on user
visits, now the Kubernetes can add more versions of your application during busy times and
lessen them during quiet times.
10.2. Docker
It lets you to putting your application and all its stuff, and everything into a box, called a
special box or a container. If your application needs certain tools or versions to work, or
certain things to run, the docker makes sure it works the same way in every place you use
it. As It should works the same everywhere, whenever you opens that box/container. It
basically, package your application and its dependencies into a container. If your
application requires specific versions of libraries, then Docker ensures it runs consistently
across different environments.
You need to identify your system specifications to choose the Product/file description. The
website will contain the latest version for your corresponding system. For Windows, we’ll
be downloading the latest x64 Installer of Java SE Development Kit 18. After the
download is complete, proceed to install the JDK by following the bootstrapped steps.
Step 2: Configure Environment Variables
After the installation is complete, we have to configure environment variables to notify the
system about the directory in which JDK files are located. Proceed to C:\Program
Files\Java\jdk-{YOUR_JDK_VERSION}\bin (replace {-} with your JDK version)
To set the Environment Variables, you need to search Environment Variables in the Task Bar
and click on “Edit the system environment variables”.
java -version
javac -version
In order to set up Java with Eclipse IDE, you have to download the latest eclipse IDE
package from their official website. The current set up is performed using Eclipse IDE 2021-
12.
Download the coding pack for Java - Windows i.e. eclipse-inst-jre-win64.exe (name may
change later).
Now, double click on this installer. So, you will see the screen below. In order to install
eclipse, click on the Run button.
On the next screen, you will see many different packages for Eclipse. Make sure you install
the Eclipse IDE for Java EE Developers package.
Step-3: Configure Installation Location
By default, It will show the path for Java VM and Installation folder. However, if you want
you can select an appropriate path for Java VM and Installation folder. Now, click on Install.
Now, Eclipse IDE is installed successfully on your system. Click on Launch to start the
Eclipse. Moreover, you can also start the application from the start menu or Desktop icon.