views:

127

answers:

1

I am looking for a dependency injection framework for a Java SE (Swing) application that runs under JDK 1.4. Are there any recommended DI frameworks that I can use? (Guice and other annotation-based frameworks are out, and I don't want to mess with something like Retroweaver.)

Also, is Spring suitable for use in a Java SE application?

edit: this is a legacy application (which is why it's jdk 1.4) - I want to use spring to get some sanity into the ball of mud

+3  A: 

yes, it is. There is even a whole project called Spring Rich Client:

Spring-RCP's mission is to provide an elegant way to build highly-configurable, GUI-standards-following rich-client applications faster by leveraging the Spring Framework, and a rich library of UI factories and support classes.

dfa
On their site, under FAQ: "Can I use the project under java 1.4? No, as of 1.1.0 the codebase can only be run on 1.5+ JVM environments. "
amischiefr
you are right however spring 2.x runs under Java 1.4
dfa
not so much interested in rcp, I'm working on a legacy app. I see now that Spring 3.0 requires Java 5. Spring's web site is pretty, but not terribly informative.
Ken Liu