Results 1 to 8 of 8

Thread: Brand New to Spring and could use help

  1. #1
    Join Date
    Jun 2012
    Posts
    5

    Default Brand New to Spring and could use help

    Greetings:

    As the title indicates I am brand new to Spring. I have been using Java for quite some time and I installed the STS into Eclipse 3.7 (Indigo) and the version is Spring Framework 3 (from the Eclipse Marketplace).

    I am trying to do a 'hello world' application in Eclipse and all the tutorials I have found assume that Spring is installed outside of Eclipse it seems. I was hoping someone had a good link to a tutorial using the setup that I have with Indigo/Spring 3 where we would start by NEW--> Project -->Spring Project?

    Or I would need to know if I still have to have the framework externally installed as well as the STS?

    There is some confusion here obviously, so help is appreciated.

    Thanks,

    Mike Needham

  2. #2
    Join Date
    Jun 2012
    Posts
    5

    Default

    Hey All:

    Not sure I did the right thing, but I went ahead and downloaded the framework and imported the JAR files into my project and everything is working, but I am hoping that I don't have to do this for hibernate and Groovy/Grails as well. It seems also that Maven was needing to be installed, so I did that. So the question now is: Is this necessary to get Spring to work inside Eclipse? Or did I miss something?

    Thanks again,

    Mike

  3. #3
    Join Date
    Sep 2008
    Location
    Hamburg, Germany
    Posts
    1,650

    Default

    Hey!

    Did you take a look at this post:
    http://forum.springsource.org/showth...etting-Started

    Hope this helps!
    -Martin
    Martin Lippert
    SpringSource, a division of VMware
    SpringSource Tools Team
    http://www.springsource.com
    http://twitter.com/martinlippert

  4. #4
    Join Date
    Jun 2012
    Posts
    5

    Default

    Thanks Martin. The link you sent seems to be a good resource. I have gone through the links on that posting and it looks like I did the right steps for "getting spring into an existing installation of Eclipse" which is my case, but I still am not sure why the libraries aren't there when I launch a Spring project. I may have (still) done more footwork than needed to be done to get my results. But I will look over everything when I get a chance to see if I need backup and try again.

    In any case, thanks for the reply.

  5. #5
    Join Date
    Jun 2012
    Posts
    5

    Default

    OK. Went back and installed the Springsource exe for Windows (32bit) and on launch I get an error "Error: Could not create Java Virtual Machine; Error: A Fatal Exception has occured. The program will exit." and then it gives a list of stuff about the JAR when you click the OK button in a window with a title of STS.

    My configuration is JDK 7 on Windows Vista Sp2 all 32 bit.

    All of my other Java programs run fine, but not sure why SpringSource STS is puking.

    I believe this is why I opted to install the Eclipse Marketplace into my existing 3.7.2 installation when this happened before, but if we can figure out what I need to "fix" to get SpringSource running, that would be great.

    Thanks again for all the help in advance!

  6. #6
    Join Date
    Jun 2012
    Posts
    5

    Default

    After doing research, I found that my system needs the -Xmx set to 512m instead of 768m in the STS.ini. I also updated the java version to 1.6 in that file since I am on 1.7. The IDE now runs. I am curious though about whether this again was necessary as I already have a full Eclipse 3.7.2 running and had the SpringSource installed there within :-) The problem was the libraries (like from helloworld ) from here: http://www.tutorialspoint.com/spring...ld_example.htm

    It states we have to add the libraries manually from the build path. I thought that they would be installed with the Marketplace install and if so, the question is where are they located and then how do you load them always?

  7. #7
    Join Date
    Sep 2008
    Location
    Hamburg, Germany
    Posts
    1,650

    Default

    Hey!

    There are basically two ways of dealing with the dependencies: either use Maven and the integrated Maven Integration for Eclipse (this is what the "Getting Started with Spring and STS" webinar shows you), or add the libraries of your choice directly to your project build path (as shown in the tutorial that you are referring). In that case, you need to download the Spring framework (version of your choice) from http://www.springsource.org, extract them onto your hard drive and go.

    The main Spring libs in version 3.1.1 are also included in the IDE (because they are used by the IDE, you can find them in the plugins directory of your IDE installation), but I would recommend to not use those JAR files. They get updated whenever the Spring IDE decides to switch to a newer Spring framework version internally, which should not affect your projects. Therefore I recommend to use Maven or the directly download Spring framework libs instead of something that is used by the IDE under the hood.

    HTH,
    Martin
    Martin Lippert
    SpringSource, a division of VMware
    SpringSource Tools Team
    http://www.springsource.com
    http://twitter.com/martinlippert

  8. #8
    Join Date
    Sep 2008
    Location
    Hamburg, Germany
    Posts
    1,650

    Default

    Hey!

    There are also some template projects to start with, if you want. You could relatively easily create a Spring Template project by using the Spring Web MVC template project, type in a name and a package of your choice and get the first Spring project running in your STS in just a few minutes. (If there are errors showing up in the project, just trigger a clean build again using Project -> Clean).

    HTH,
    Martin
    Martin Lippert
    SpringSource, a division of VMware
    SpringSource Tools Team
    http://www.springsource.com
    http://twitter.com/martinlippert

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •