Zookey
Zookey

Reputation: 2707

Need help to get started with Spring framework

I want to learn Java EE Spring framwork. So, I downloaded Spring Tool Suite from their site, and I followed this "Hello World" example: http://www.tutorialspoint.com/spring/spring_hello_world_example.htm

As you can see, he is importing some .jar files, and I also import them but I dont have antlr-runtime-3.0.1 and commons-logging-1.1.1, or at least I cant find them.

So when I run try to run application, I dont know how to run application, because I have just 2 options: AspectJ/Java and Java application.

Of course, when I try to run app, I get error.

You can take look at screenshoot.

enter image description here

Upvotes: 0

Views: 711

Answers (2)

Lee Meador
Lee Meador

Reputation: 12985

Here is a good place to go look for jars:

http://mvnrepository.com/artifact/org.antlr/antlr-runtime

Notice this page has several versions of antlr. If you click the link to 3.0.1, you can download the jar.

There is probably a website for antlr that has the jars but it might not have old ones where they are easy to find.

Similarly for commons-logging, there is an Apache site for it. But you can find it by searching at http://mvnrepository.com though you may have to poke around to find it.

For your second question, run as a Java application. The tutorial has a class MainApp that contains a main() method. You use MainApp as the starting class and it will begin running the main() method's code.

This is standard Java behavior. You might want to run through some simple Java tutorials to learn how plain old Java works and then add Spring Framework when you are a bit more proficient.

Upvotes: 1

Gab
Gab

Reputation: 8323

In your case the Java Application runner is appropriated cause you're indeed writing a java application. The tutorial you're following specify to install first spring and commons-logging API. (http://www.tutorialspoint.com/spring/spring_environment_setup.htm) You will then be able to find the expected libraries in the APIs installation folders. I would recommand to use maven for every java project, it will allow you to easly manage your dependencies.

Upvotes: 0

Related Questions