Aren't you looking at the wrong Weld class? There are actually two of them:
- org.jboss.weld.environment.se.Weld (the one you are looking for)
I suppose you imported the second one.
(I just downloaded weld-2.0.3.Final and the code works fine for me.)
Yes, that will be it. I've just looked back at the docs and it's really not clear at all. Perhaps the example should either reference the fully qualified name or should include an import line?
Who would update that documentation?