May 12, 2004

Apple Java 1.4.2 SDK Update can break a J2EE 1.3.1 SDK install

Filed under: Java — Barry Hawkins @ 11:52 pm

Yeah, so I’m working away on my EJB tutorials and upon checking Apple Developer Connection (ADC), I notice that there was an SDK update to accompany the Java 1.4.2 Update for the runtime. Egad, how careless of me! I pull down the 50.6MB chunk and install it right away. Upon reboot, my Sun Linux J2EE 1.3 SDK reference implementation (RI) and deploytool are dead. Yep, dead. Imagine the horror.

I posted to the help for Head First EJB and to the Apple Java Development mailing list, hoping for a good word. It turned out that Google led me to a Debian Java mailing list post that outlined the solution wonderfully. Go Debian!

The notes from the Head First EJB site are for when your shell is tcsh, the default in Jaguar (Mac OS X 10.2.x) and earlier. As of Panther (10.3), the default shell is bash. So, the additions to your .bashrc or .bash_profile or .profile (adjusting the installation path as appropriate) would be:

# Java general settings
export JAVA_HOME=/Library/Java/Home
export CLASSPATH=.

# J2EE-specific settings
export PATH=”${PATH}”:/Users/username/j2ee/j2sdkee1.3.1/bin
export J2EE_HOME=/Users/username/j2ee/j2sdkee1.3.1
export CLASSPATH=”${CLASSPATH}”:”${J2EE_HOME}”/lib/j2ee.jar:”${J2EE_HOME}”/lib/locale

Upon adding the “${J2EE_HOME}”/lib/locale to the PATH environment variable and deleting j2ee.jar from /Library/Java/Home/lib/ext, I saw a dramatic performance increase in both the RI and deploytool. (I had put j2ee.jar in that folder as a lazy way to poke around in it with the Java Browser tool from Apple.) It goes without saying that this has restored a certain level of order to my world. It’s hard to study J2EE without the SDK.

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress