SPRING FRAMEWORK COMPONENT INSTALLATION ON LINUX

Before I walk you through the tools needed for Spring Framework on an Ubuntu 22-04 LTS machine I will summarize the features of my development machine; you will see why shortly. I am working on a MacOS Sonoma 14.1 computer Apple M2 chip ARM 64 architecture. Through Parallel Desktop 19 for Mac Standard edition I virtualized two environments, Windows 11 Professional and Ubuntu Linux 22-04 LTS. Unfortunately, on this architecture in both Ubuntu 22-04 LTS and Windows, MySQL Server and MySqlWorkbench are not supported. Therefore, I will not be able to show you the installation of this component. If you are not bound to this architecture these are the links for Linux. However, the file for restoring the database to MySQL and the Web Application, useful for testing the installed components, will be available as a downloadable resource.

MySQL Server:

https://dev.mysql.com/downloads/mysql/

MySqlWorkbench:

https://dev.mysql.com/downloads/workbench/

JDK INSTALLATION

Go with your browser to the following URL:

https://www.oracle.com/it/java/technologies/downloads/

JDK

Download the version for your architecture. Open the terminal and type the following commands:

sudo mkdir -p /usr/lib/jvm

sudo tar -zxf ‘path of jdk’ -C /usr/lib/jvm

It will unpack the tar.gz file in the /usr/lib/jvm folder.

JAVA_HOME ENVIRONMENT VARIABLE SETTING

sudo nano ~/.bashrc

At the end of the file type:

export JAVA_HOME=/usr/lib/jvm/jdk-21.0.1

export PATH = {$PATH}:${JAVA_HOME}/bin

type the env command in the terminal to see if the new environment variable is present. Finally, the command

java -version to see if everything works correctly.

INSTALLATION OF MAVEN

We type the command mvn -v in the terminal to see if Maven is already installed. If not, we type:

sudo apt install maven

We rewrite the mvn -v command to see if everything was successful, the Maven installation path and if the JDK was found.

INSTALLATION OF APACHE TOMCAT

We go to https://tomcat.apache.org/download-90.cgi and download the tar.gz file. All we have to do is create a new folder within the home directory and extract the archive. To see if Tomcat is running drag the startup.sh file located in the bin folder and drop it into the terminal. Then run the command and go with your browser to http://localhost:8080. To shut down Tomcat repeat the operation this time using the shutdown.sh file.

INSTALLATION OF SPRING TOOL SUITE

Let’s go with our browser to the address:

https://spring.io/tools

and select the Linux version for our architecture.

Download STS

Installation is simple, just unzip the file in the created Development folder and launch the application.

CONFIGURE TOMCAT IN SPRING TOOL SUITE

The following video illustrates the procedure. Before testing the project, you must install the following software components from the Eclipse  Marketplace, which is located under the Help menu item.

  • Eclipse Enterprise Java and Web Developer Tools 3.31
  • Eclipse Web Developer Tools 3.31

DOWNLOAD SQL MYSQL SCRIPTS

MYSQL SCRIPT

DOWNLOAD WEB APP

WEB APP

THE JAVA LANGUAGE

THE JAVA LANGUAGE

LINKS TO PREVIOUS POSTS

SPRING FRAMEWORK