This section will take you on preparing development environment to start with Spring Framework. This section also teaches us how to setup JDK, Eclipse and Tomcat on your machine before setting up Spring Framework.
Latest version of SDK can be downloaded from Oracle’s Java site: Java SE Downloads. Instructions to install JDK is provided in downloaded files. One can follow the instructions and configure the setup. PATH and JAVA_HOME environment variables need to set for referring to the directory which contains javac and java i.e., java_install_dir and java_install_dir/bin respectively.
Set the below variables in the C:\autoexec.bat file if we are running Windows and the JDK is installed in C:\jdk1.6.0_15.
If on Windows NT/2000/XP right-click on My Computer, select Properties, and Advanced, then on Environment variables. Then, you would update the PATH value and press the OK button.
On Unix (Solaris, Linux, etc.), if the SDK is installed in /usr/local/jdk1.6.0_15 while using C shell, we must keep the following in our .chsrc file.
If any one of the Integrated Development Environment (IDE) like Borland JBuilder, IntelliJ IDEA, Eclipse or Sun ONE Studio is used, need to compile and run a simple program to get a confirmation that IDE knows where we installed Java or should setup properly as per the document.
Check and download the latest version of Apache Commons Logging API from http://commons.apache.org/logging/. Once the download is complete, unzip/unpack the binary distribution into a suitable location for example in C:\commons-logging-1.1.1 on windows, or /usr/local/commons-logging-1.1.1 on Linux/Unix. The location has the below jar files and other documents etc.
CLASSPATH variable should be set in the directory or we will face problem when running our application.
It’s preferred to use the latest version of Eclipse installed as the examples in this tutorial are written using Eclipse IDE.
Download and install the latest Eclipse binaries from http://www.eclipse.org/downloads/. Once the download is complete, unzip/unpack the binary distribution into a suitable location for example in C:\eclipse on windows, or /usr/local/eclipse on Linux/Unix. Set the PATH variable appropriately.
We can start Eclipse simply by double clicking on eclipse.exe or by executing the following commands.
On Unix (Solaris, Linux, etc.), Eclipse can be started by executing the below commands.
Below result is displayed if startup is successful and everything is fine.
Once everything is set, we can move on to setting up Spring Framework. Below are the steps to follow for downloading and installing the framework.
We will see all the libraries in E:\spring\libs. CLASSPATH variable should be set in this directory or we will face problem when running our application. If Eclipse is used, then no need to set CLASSPATH as Eclipse will set it.
We are ready to move to our first Spring example once we are done with the last step. We will see the example in the next tutorial.
Spring MVC Framework Related Interview Questions
|J2EE Interview Questions||Hibernate Interview Questions|
|MVC Framework Interview Questions||Framework7 Interview Questions|
|Maven Interview Questions||JUnit Interview Questions|
|Log4j Interview Questions||Spring MVC Framework Interview Questions|
|Java J2ee Architect Interview Questions||Spring Boot Interview Questions|
|Spring Batch Interview Questions||Spring Security Interview Questions|
Spring Mvc Framework Tutorial
Spring Mvc Framework
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.