In this article you will learn each and every step required to configure Spring core with eclipse IDE with the help of screenshots.
- First, install JDK (greater or equal JDK 1.6) from here on your Operating System
- Install eclipse from https://eclipse.org/downloads/ based on your operating system
- If OS is windows open Environment variables
- Click on Environment variables tab and add JAVA_HOME(under System variables) and provide installation directory of Java in value field. Our installed directory is "C:\Program Files(x86)\java\jdk1.8.0_73"
- Double click on Path variable under System variable section
- Add "%JAVA_HOME%\bin" after variable value.(Don’t delete anything just append) click ok.
- Open command prompt and hit following command and type "java -version" in the command prompt, If it is showing java version that means java has been successfully set up and set in classpath.
- If OS is Linux, Open .bashrc file under home directory and add the following commands.
export JAVA_HOME = /usr/local/jdk1.8.0_73
- Open a terminal and type “java -version” If it is showing java version, that means java has been successfully set up and set in classpath.
- Go to eclipse installation directory and click on eclipse.exe.
- Eclipse asks for a workspace, please choose a workspace let say “C:\\javaProj” or in Linux “/home/<user>/javaproj”
- Create a java project in eclipse called "SpringAssignment"
- create a folder lib under SpringAssignment \lib
- Download commonLoggin1.2.jar from here http://commons.apache.org/proper/commons-logging/download_logging.cgi
- extract it and put jars into lib folder we had created earlier(SpringAssignment \lib).
- Download spring from here
- Extract it and put all jars into the lib SpringAssignment\lib folder.
- Right click on SpringAssignment ->properties->java build path
- click on add external jar and add all jars under lib folder
Well done setup is complete, now we will test it with a basic application in next chapter.