How to Install Spring Framework|Set up & Configuration Guide
How to Install Spring Framework|Set up & Configuration Guide
This article will guide you on How to prepare a Development Environment to start with Spring Framework. And you will also come to know How to set up JDK, Eclipse and Apache Tomcat and on your Desktop/Laptop.
Step 1 –How to Setup the Java Development Kit (JDK)
Download the latest version of SDK from Oracle's Java official website Java SE Downloads. Here, you will find some instructions for installing JDK in downloaded files, follow the given instructions to install and configure the setup. After that set PATH and JAVA_HOME environment variables to refer to the directory that contains Java Java_install_dir/bin and Java_install_dir respectively.
In case, If you are running Windows and you have installed the JDK in C:\jdk1.6.0_15, then you would have to write the following command line in your C:\autoexec.bat file as shown below.
The command must be entered like this:-
set PATH=C:\jdk1.6.0_15\bin;%PATH%
set JAVA_HOME=C:\jdk1.6.0_15
For Windows NT/2000/XP, you will have to right-click on My Computer, folder then click on Properties → Advanced → Environment Variables. And then, update the PATH value and click the OK button.
For UNIX users, if the SDK is installed in the location /usr/local/jdk1.6.0_15 and if you are using the C shell, you will have to write the following command line into your .cshrc file which is shown below.
The command must be entered like this:-
setenv PATH /usr/local/jdk1.6.0_15/bin:$PATH
setenv JAVA_HOME /usr/local/jdk1.6.0_15
If you are using IDE like Eclipse, JBuilder, IntelliJ IDEA, you will have to compile and run a simple program to confirm that the IDE can identify that where you have installed Java.
Step 2 - Installing Apache Common Logging API
Before going to install, first download the latest version of Apache Commons Logging API. Once the installation is downloaded, unpack all these files and move them to a specific location.
For Windows users: - C:\commons-logging-1.1.1
For Linux/ UNIX users: - /usr/local/commons-logging-1.1.1
Make sure that you have properly set your CLASSPATH variable on this directory otherwise it shows Errors while running your application.
Step 3 –How to Setup Eclipse IDE
To install Eclipse IDE, download the latest Eclipse binaries from Eclipse.org official website. Once the installation is downloaded, unpack all the files and paste them to your desired location.
For Windows in C:\eclipse
For Linux / UNIX: - /usr/local/eclipse .set the PATH variable appropriately.
For Windows Users:-
You can start the Eclipse by executing the following commands on
Or you can simply double-click on eclipse.exe
%C:\eclipse\eclipse.exe
For UNIX Users (Solaris, Linux, etc.):-
You can start the Eclipse by executing the following commands on
$/usr/local/eclipse/eclipse
Step 4 - Setup Spring Framework Libraries
Below mentioned are the simple steps on How to download and install the framework on your PC.
· Before Installing Spring make sure that for which OS you want to install whether you want to install it on Windows or UNIX, and then download .zip file for Windows and .tz file for Unix.
· After that you can download the latest version of Spring framework binaries according to the platform.
· You will find a file like this, spring-framework-4.1.6.RELEASE-dist.zip .After the file was downloaded unzip it, to the folder which you want to use.Here we are using the Local Disk D. So, then the following directory structure is D:\spring.
Here you will find all the spring libraries in the directory D:\spring\libs. Confirm that you have properly set your CLASSPATH variable on this directory otherwise it shows some Errors while running your application. As all the settings will be done through Eclipse. Then there is no need to set CLASSPATH If you are using Eclipse IDE
Once you have followed and executed all the above steps with now you can ready to implement your first spring project in the IDE.
Summary:-
This brings us to the end of this article on How to Install Environment setup for Spring Framework In this article you have learnt How to setup JDk, Installing Apache common logging API, How to install Eclipse IDE, and also How to setup Spring Framework Libraries. We hope you have got a better understand with the steps clearly which were mentioned above.
Comments
Post a Comment