Advertisement

header ads

Configure Maven + Tomcat + JDBC for your PC



Hello there. Its been a couple of weeks since i uploaded a tutorial on E-Money and Home automation. You can read our unique E-Money tutorial from following links:



  • Also you can read our step by step home automation tutorial from here.

Today we are going to talk about some programming stuff. Actualy its about java.But not the basic stuffs like loops or if conditions. Have you ever heard about Spring Framework or hibernate in java. If not,don't worry . Today you are going to start learning these stuffs from basics.


Spring framework is a structure that uses in java for web application development. This framework is very popular in today among developers because it is very easy to develop and has very good security. But there are some pre-configurations that you have to make before start using Spring MVC.


Configuring Maven + Tomcat + JDBC in windows


In order to do that you can go through following steps.
you have to have a PC with an internet connection


  • Install java from this link . Then check the installation as follows


  • Open cmd (command prompt) and type "java -version" and hit enter.You should get the installed jdk version information.Also type again "javac -version" and enter.Now you should get javac (JavaCompiler) information.



  • Then install java developing environment. You can use intellJ,netbeans or eclipse.In this tutorial, I use eclipse.Go to this link download and install eclipse as a normal software.
  • Then you can configure spring mvc in your PC. Go to this link and download apache maven package.you can download latest .zip file. Extract it to any partition (I reccomend to extarct to the java installed folder in C: )



  • Then go to this link and download apache tomcat server.extarct it to the same place
  • After that go to this link and download apache ant and extarct it to the same folder.



  • Then go to the place which you has extracted all downloaded modules.
  • Go to the maven >> bin folder and copy its path.



  • And go to the control pannel > system variable > add new environment variable > double click the file called path > put a semicolon";" to the last entry and paste the path that you have copied before.> save settings.



  • Then go to the bin folder of the tomcat also and do the same thing .Add the path to the PATH entry after a semicolon.
  • Then go to ant folder and copy the folder-inside path and paste at the PATH entry.
  • Now go to this link and download ojdbc drivers. you have to make a free account to do so.



  • Then enter following command by replacing the given path with your ojdbc.jar downloaded path.



mvn install:install-file -Dfile={Path/to/your/ojdbc.jar} -DgroupId=com.oracle
-DartifactId=ojdbc6 -Dversion=11.2.0 -Dpackaging=jar

  • Now go to eclipse > Help > install software > put all available sites and search m2e packages. Then install it.



  • Then restart your PC.


Go to CMD and type following codes and press enter

"mvn -v"
"ant -version"

this should give you following results.



Now you have successfully installed and configured Maven + Tomcat + JDBC into your PC.

Now open eclipse>new project>select maven project and give a name.>OK
Now eclipse should create a maven project successfully if all are correct. If errors remaining, carefully check the error descriptions and make a google search for solution.or comment below.

Post a Comment

0 Comments