Installation of Spring Tool Suite on Windows
In this section, we will see the detailed steps to properly install STS on Windows OS without any problem or issue:
Step 1: Firstly, we need to download the official .zip file of STS from its website. You can download the Spring Tool Suite from the above link. Select the appropriate platform as Windows and download the package.
Downloading STS Zip File
Step 2: Once the download is been done, we need to extract the contents of the ZIP file to the directory of our choice on our Windows Machine.
Extracted Zip File
Step 3: After extracting, we need to navigate to the directory, where we have extracted the STS. In this directory, we will have the file “SprinttoolSuite4“. We need to click on that file to open the launcher
Clicking on Application
Step 4: Once the launcher is been displayed, we will be prompted to select a workspace location where your projects and configurations will be stored. We can choose the default location or specify your own.
Setting Up Workspace Path
Step 5: Then we can choose to install additional plugins for specific tasks or frameworks by going to the “Help > Eclipse Marketplace” tab in the STS dashboard.
Installing Additional Plugins
Step 6: Once the installation is complete, we can start creating and managing Spring-based projects in the Spring Tool Suite IDE.
Using STS IDE
How to Verify the Installation?
In this section, we will verify the STS installation by creating a Simple program. So follow the below steps to make the simple application and verify the installation:
Step 1: First, create the New Project by navigating to the File Menu. Select New > Spring Starter Project.
Step 2: A window will open, in which we need to give the Project Name, and select the versions as per our choice.
Step 3: Then we can select the dependencies that are required for our application. For demonstration purposes, we have selected Spring Web, Spring Boot DevTools, and Thymeleaf dependencies.
Step 4: After configuring and clicking on the Finish button, the below directory structure will be created for our application.
Step 5: In the src/main/java folder, we need to create a New package by clicking on New > Package.
Step 6: Once the package gets created, we need to create a New class by clicking right-clicking on the package and selecting New > Class.
Step 7: Once the class gets created, paste the below code in the file which has the simple Hello GeeksforGeeks message printed.
Step 8: After entering the code, we need to run the project by right-clicking on the main application file and selecting the option Run As > Spring Boot App.
Step 9: This will start the server on port 8080. You can see the entire logs in the console section.
Step 10: After visiting the URL as “http://localhost:8080/” the message will get printed on the Web Browser.
Step 4 – Setup Spring Framework Libraries
Now if everything is fine, then you can proceed to set up your Spring framework. Following are the simple steps to download and install the framework on your machine.
-
Make a choice whether you want to install Spring on Windows or Unix, and then proceed to the next step to download .zip file for Windows and .tz file for Unix.
-
Download the latest version of Spring framework binaries from https://repo.spring.io/release/org/springframework/spring.
-
At the time of developing this tutorial, spring-framework-4.1.6.RELEASE-dist.zip was downloaded on Windows machine. After the downloaded file was unzipped, it gives the following directory structure inside E:\spring.
You will find all the Spring libraries in the directory E:\spring\libs. Make sure you set your CLASSPATH variable on this directory properly otherwise you will face a problem while running your application. If you are using Eclipse, then it is not required to set CLASSPATH because all the setting will be done through Eclipse.
Once you are done with this last step, you are ready to proceed to your first Spring Example in the next chapter.
‘Coding has over 700 languages’, ‘67% of programming jobs aren’t in the
technology industry’, ‘Coding is behind almost everything that is powered
by electricity’, ‘Knowing how to code is a major requirement for
astronomers’, ‘The first computer didn’t use any electricity’, ‘Do you
know there is a coding language named “Go“’, ‘Computer programming is one
of the fastest-growing careers’, ‘Fortran (FORmula TRANslation) was the
name of the first programming language’, ‘The first programmer was the
daughter of a mad poet’, ‘Many programming languages share the same
structure’, ‘Coding will soon be as important as reading’, ‘How many
programmers does it take to change a light bulb? None, that’s a hardware
problem’, ‘Why do Java developers wear glasses? Because they can’t C’,
‘Software and temples are much the same — first we build them, then we
pray’, ‘An engineer will not call it a bug — it’s an undocumented
feature’, ‘In a room full of top software designers, if two agree on the
same thing, that’s a majority’, ‘C programmers never die. They are just
cast into void’, ‘Knock, knock … Who’s there? … *very long pause* … Java’,
‘The best thing about a boolean is even if you are wrong, you are only off
by a bit’, ‘Linux is only free if your time has no value’, ‘The computer
was born to solve problems that did not exist before’, ‘Coding has over
700 languages’, ‘67% of programming jobs aren’t in the technology
industry’, ‘Coding is behind almost everything that is powered by
electricity’, ‘Knowing how to code is a major requirement for
astronomers’, ‘The first computer didn’t use any electricity’, ‘Do you
know there is a coding language named “Go“’, ‘Computer programming is one
of the fastest-growing careers’, ‘Fortran (FORmula TRANslation) was the
name of the first programming language’, ‘The first programmer was the
daughter of a mad poet’, ‘Many programming languages share the same
structure’, ‘Coding will soon be as important as reading’, ‘How many
programmers does it take to change a light bulb? None, that’s a hardware
problem’, ‘Why do Java developers wear glasses? Because they can’t C’,
‘Software and temples are much the same — first we build them, then we
pray’, ‘An engineer will not call it a bug — it’s an undocumented
feature’, ‘In a room full of top software designers, if two agree on the
same thing, that’s a majority’, ‘C programmers never die. They are just
cast into void’, ‘Knock, knock … Who’s there? … *very long pause* … Java’,
‘The best thing about a boolean is even if you are wrong, you are only off
by a bit’, ‘Linux is only free if your time has no value’, ‘The computer
was born to solve problems that did not exist before’,
Download and Install Spring Tool Suite IDE on Windows
- Details
- Written by Nam Ha Minh
- Last Updated on 27 July 2022 | Print Email
In this article, I’d like to share with you guys, how to download and install Spring Tool Suite IDE on Windows operating system. This helps you get started with development of enterprise Java applications using Spring framework and Spring Boot.NOTE: Install Spring Tool Suite on Windows require Java Development Kit (JDK). Kindly follow this article if you have not installed JDK on your computer.
Installation
You can install the Spring Tools for Eclipse IDE into an existing Eclipse installation using the Eclipse Marketplace. Just open the marketplace client in Eclipse, search for Spring Tools and install the “Spring Tools (aka Spring IDE and Spring Tool Suite)” entry.
In case you prefer to use a ready-to-use distribution, you can go to https://spring.io/tools and download the Spring Tool Suite distribution, which is a full Eclipse distribution (based on the latest Eclipse release) with Spring Tools pre-installed.
What is Spring Tool Suite IDE?
Spring Tool Suite (STS) is an IDE based on Eclipse IDE – one of the most popular Java IDEs. You’re already familiar with Eclipse, you will find STS easy to use like Eclipse.STS is free and open-source. It is developed by The Spring Team at VMWare which is the company that manages Spring platform, so it is best suited for developing Spring-based projects.The latest version of STS is 4.15.1 (as of July 2022). Note that Spring Tool Suite 4 is officially named as Spring Tools 4 for Eclipse.
Spring Tool Suite Download
Step 1: Go to their website and in Spring Tools 4 for the Eclipse section in order to download. choose your corresponding file according to your OS.
Here we are going with Windows operating systems so do we have chosen Windows option as seen in the below image.
Step 2: After clicking on the button a Jar file will be downloaded to your local system. Now create a folder and move this Jar file to that folder. And double-click on that Jar file. A pop-up window will appear like below:
Step 3: After successfully Unpacking a new folder will create as shown in the below image:
Now open the folder,
Step 4: In this folder now click on the SpringToolSuite4 Application file as shown in the below image:
Step 5: Now select your directory as workspace by clicking on the Browse button and then click on the Launch button. And you are done.
This is the Home screen for Spring Tool Suite (Spring Tools 4 for Eclipse) IDE
Feeling lost in the vast world of Backend Development? It’s time for a change! Join our Java Backend Development – Live Course and embark on an exciting journey to master backend development efficiently and on schedule. What We Offer:
- Comprehensive Course
- Expert Guidance for Efficient Learning
- Hands-on Experience with Real-world Projects
- Proven Track Record with 100,000+ Successful Geeks
Last Updated :
08 Nov, 2023
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment…
Spring Tools for Eclipse IDE
Importing a Getting Started guide
With STS up and running, open the Import Spring Getting Started Content wizard from the File menu.
A pop-up wizard will offer you the chance to search and pick any of the published guides from the Spring website. You can either skim the list, or enter search words to instantly filter the options.]
The criteria is applied to both the title and the description when offering instant search results. Wildcards are supported. |
You can also decide whether to grab the initial code set, complete code set, or both. For most projects, the initial code set is an empty project, making it possible for you to copy-and-paste your way through a guide. The complete code set is all the code from the guide already entered. If you grab both, you can compare your work against the guide’s and see the differences.
Finally, you can have STS open a browser tab to the guide on the website. This will let you work through a guide without having to leave STS.
For the purpose of this guide, enter rest into the instant search box. Then pick Consuming Rest. Pick Maven for building, and initial and complete code sets. Also opt to open the web page as shown below:
STS will create two new projects in your workspace, import the Consuming Rest code base (both initial and complete), and open a browser tab inside STS as shown below:
From here, you can walk through the guide and navigate to the code files.
Step 3 – Setup Eclipse IDE
All the examples in this tutorial have been written using Eclipse IDE. So we would suggest you should have the latest version of Eclipse installed on your machine.
To install Eclipse IDE, download the latest Eclipse binaries from https://www.eclipse.org/downloads/. Once you download the installation, unpack the binary distribution into a convenient location. For example, in C:\eclipse on Windows, or /usr/local/eclipse on Linux/Unix and finally set PATH variable appropriately.
Eclipse can be started by executing the following commands on Windows machine, or you can simply double-click on eclipse.exe
%C:\eclipse\eclipse.exe
Eclipse can be started by executing the following commands on Unix (Solaris, Linux, etc.) machine −
$/usr/local/eclipse/eclipse
After a successful startup, if everything is fine then it should display the following result −
Creating Spring Boot projects from scratch
The most famous way to create new Spring Boot projects is to go to https://start.spring.io and choose which Spring starter modules you wanna use. Once you do that, you can download a ZIP file of your new project and import that into your development environment.
The Spring Tools for Eclipse IDE come with a direct integration of that into your Eclipse IDE. Go to “File”, select “New” and choose the “Spring → Spring Starter Project”. The wizard lets you choose the Spring Initializr endpoint you would like to use (in case you have a custom one running within your company, for example) and then lets you select a boot version and offers all the Spring Boot starter modules that are around for that boot version. Just choose the ones that match your interest and click “Finish”. You end up with a ready-to-use Spring Boot project in your workspace – in just a few seconds.
Spring Tools for Eclipse IDE
To make it even easier to write modern Spring Boot applications, the latest generation of the Spring Tools for the Eclipse IDE are well suited for getting started with Spring Boot and working on large microservice applications that are based on Spring Boot. This article walks you through the most important features of the tooling and provides great insight into a number of tips and tricks along the way.
Using Spring Guides
In case you want to learn about a specific area of Spring and Spring Boot, you might want to take a look at the Spring Guides: https://spring.io/guides. They offer a comprehensive set of small tutorial-like step-by-step introductions to specific features of Spring. You can use them, for example, to learn how to implement your first RESTful service that delivers JSON.
Those guides can be imported into your Spring-Tools-enhanced Eclipse IDE by using the “Import Spring Getting Started Content” wizard, also available from the “New” menu. It is a great way to quickly import those guide projects, try them out, and learn from them.
Running Spring Boot apps
Suppose we have a simple Spring Boot application that we got from importing the “Rest Service” guide. It implements a simple @RestController and serves some JSON back to the user. In order to run this app, you could select “Run As → Spring Boot App” or create your own launch configuration in the Eclipse IDE. A better and easier way to run your Spring app is the Spring Boot Dashboard. It is a separate view in your IDE that you can activate from the toolbar (look for the Spring Boot icon).
The Spring Boot Dashboard lists all the projects from your workspace that are Spring Boot projects. You can select one or multiple projects and run them just by hitting the “(Re)Start” button. It will create a default launch config for your Spring Boot app automatically if you don’t have one yet.
The Spring Boot Dashboard helps you to deal with potentially many Spring Boot apps in your workspace. It allows you to filter them, start or even restart multiple apps in parallel, or easily jump to the right console view for a running app.
The Spring Boot Dashboard, in addition to managing the launching of apps, offers more facilities for gaining insights into your applications. Jumping to the properties view from a running and selected Spring Boot app in the dashboard, you will see not just a quick overview and a ready-to-use hyperlink that lets you jump to the frontend of the running app immediately (without looking up port numbers, etc.). You will also see two additional tabs that provide direct information from the running app: request mappings and beans. The request mappings tab, for example, shows you all the request mappings that the application serves together with its location in the source code. Double-clicks let you jump directly to the source code where the mapping is implemented. This allows you to easily navigate between your running app and your source code.
The beans tab offers you the list of beans that are live at runtime, created by the Spring application. You can browse through the list or filter for certain characters. The good thing here is that you can also see dependencies among those beans, so that you can gain insight into which bean depends on which other bean. You want to know, for example, which data source got injected into your controller? Search for your controller name in the list of live beans and you will see the answer right away.
Spring Tools 4: The new generation on the horizon
In the final section of this article, I want to give you a brief outlook at what is coming next. In December 2017 we launched the public beta of the next generation of Spring tooling. The so-called “Spring Tools 4” initiative and the corresponding public beta launch not just offers great tooling for Spring apps when working with the Eclipse IDE, but is also available for Visual Studio Code and Atom: https://spring.io/tools4.
The next generation includes all of what you have seen here in this article so far, and goes beyond that. It offers a super quick and easy source-code navigation to all the important pieces of your Spring Boot application. You will get easy access to all your request mappings, bean definitions, function implementations, data repositories, and more – just by selecting the “Go To Symbol” action.
In addition to that, your source code will be augmented with information from running Spring Boot applications. As soon as you start your Spring Boot app, real-time information from that app will appear in your source code, allowing you to get a unique insight into your running Spring Boot app. You will be able to see which beans are active, how they got wired to each other, which conditions have succeeded or failed and for what reason, and more.
Wanna give it a try? Feel free to take a look at: https://spring.io/tools4 – download and go! It is available as a ready-to-use Eclipse distribution (based on Eclipse Photon), and as extensions for Visual Studio Code, and Atom.
And feedback is always welcome. Please feel free to go to https://github.com/spring-projects/sts4/issues and raise questions, provide feedback, and report bugs and enhancement requests.
About the Author
- Spring Core Basics
- Spring – Home
- Spring – Overview
- Spring – Architecture
- Spring – Environment Setup
- Spring – Hello World Example
- Spring – IoC Containers
- Spring – Bean Definition
- Spring – Bean Scopes
- Spring – Bean Life Cycle
- Spring – Bean Post Processors
- Spring – Bean Definition Inheritance
- Spring – Dependency Injection
- Spring – Injecting Inner Beans
- Spring – Injecting Collection
- Spring – Beans Auto-Wiring
- Annotation Based Configuration
- Spring – Java Based Configuration
- Spring – Event Handling in Spring
- Spring – Custom Events in Spring
- Spring – AOP with Spring Framework
- Spring – JDBC Framework
- Spring – Transaction Management
- Spring – Web MVC Framework
- Spring – Logging with Log4J
- Spring Questions and Answers
- Spring – Questions and Answers
- Spring Useful Resources
- Spring – Quick Guide
- Spring – Useful Resources
- Spring – Discussion
Spring – Environment Setup
This chapter will guide you on how to prepare a development environment to start your work with Spring Framework. It will also teach you how to set up JDK, Tomcat and Eclipse on your machine before you set up Spring Framework −
Working with properties
Spring Boot does a lot of things automatically for you. But that doesn’t mean you can’t customize this default behavior. One way to customize the behavior is in code, the other one is by using properties. And Spring Boot offers a huge number of properties.
Assuming you want to define the port your Spring Boot app is running on. Just open the “application.properties” or “application.yml” file (depending on whether you prefer property or YAML format for your config files) and go. The Spring Tools for Eclipse IDE provide an enhanced editor experience that offers code completion for all the available Spring Boot properties.
Beyond the code completion, which offers a full list of properties together with documentation hints and types of those properties, the editor also checks keys and values for correctness. If, for example, a property is unknown, it will let you know via a warning. If the value that you put in doesn’t match the type of the property, an error will appear.
Conclusion
In Conclusion, Spring Tool Suite (STS) has various benefits, such as
- STS has various tools and features that can be used to develop Spring applications. There is a feature of a template from which we can create the basic configuration project.
- Along with this, there is the feature of code assistance. We can also integrate the various Spring technologies using STS.
- In the STE there is community support which helps to find various helping resources on the internet.
Limitations:
- There are some limitations, STS requires a high amount of resources like memory, CPU, etc. So we need to have a high-configuration computer to run the STS without any issues.
- As STS is best for the Spring projects, it is not considered for other types of project development.
- The navigations in the STS are complex which can be difficult for the new developers.
Feeling lost in the vast world of Backend Development? It’s time for a change! Join our Java Backend Development – Live Course and embark on an exciting journey to master backend development efficiently and on schedule. What We Offer:
- Comprehensive Course
- Expert Guidance for Efficient Learning
- Hands-on Experience with Real-world Projects
- Proven Track Record with 100,000+ Successful Geeks
Last Updated :
15 Nov, 2023
Like Article
Save Article
Share your thoughts in the comments