For Java, get a no bullshit reference guide that you can use when you fail to remember some specifics of the language. I recommend The Java Programming Language by Gosling, Steele and others.
It only comes as a dead tree version, if you prefer not to spend money and don't mind reading from your screen (how's your eye sight?) then the sun page lists several books available online. Of these I've only looked at the Java Tutorial by Campione & Walrath which seems pretty ok.
A lot of people swear by Effective Java by Bloch to learn the pitfalls and eccentricities of Java language but I haven't read this myself.
As far as J2EE/EJB goes the Enterprise JavaBeans by Richard Monson-Haefel comes with a JBoss Workbook with all the examples adapted for JBoss server. Mastering Enterprise JavaBeans my Ed Roman is another popular EJB book and its ok.