views:

73

answers:

3

I want to learn Guice. I use eclipse. What to download? What to install? What to do in eclipse to use guice? Thanks.

+3  A: 

You could start by following the installation guide for GuicePlugin (although that project doesn't seem very active sine April 2009):
peaberry is more up-to-date, and comes with a "Guide for using the peaberry bundle with OSGi".

If you don't need a special integration with Eclipse, all you need is the Guice2.0 release, referenced in the libraries of your project to get started.

alt text

VonC
It's funny to see how you build your response by taking from others :). Anyway, I must admit that it's more complete
Sylvain M
@Sylvain: more from Google for the first part (you were answering at the same time. +1 btw). But I do also use the "aggregation" tactic (provided I add some extra documentation).
VonC
@VonC I did what the guide says, and installed this in eclipse, but I still can't use it (Eclipse does not identify the `@Inject` annotation. What do I need to do?
Amir Rachum
@Amir: if you are talking about the Guice plugin, this is not surprising (it depends on the Eclipse version, and the project stopped one year ago). But if you simply add the right jar to your project, all Guice annotations are recognized. See the picture in my updated answer.
VonC
@VonC: No problem at all. I see that you don't just "copy/paste" other responses, I'm sure that you know what you say. The main purpose is to provide the better response, and you do it fine :) (I learn a lot from this web site and guys like you !)
Sylvain M
+1  A: 

I think you could hav a look to peaberry

http://code.google.com/p/peaberry/

Sylvain M
+1  A: 

Just download guice-2.0.zip from here and add guice-2.0.jar and aopalliance.jar to a project's classpath. Don't need anything special to use Guice.

ColinD