The env-entry actually gets stored in JNDI, so you'd have to access it just like looking up an EJB Home interface - create an initial context; look up the env-entry name; cast the value to the appropriate class.
You can find more information on using environment variables about halfway through this article on Sun's website.
Write once, run anywhere, because there's nowhere to hide! - /. A.C.