If you ever see these types of messages from the command line, there maybe a possibility of JDK being corrupted.
zmhostname Error occurred during initialization of VM java/lang/NoClassDefFoundError: java/lang/Object /opt/zimbra/bin/zmlocalconfig -q -m export Error occurred during initialization of VM java/lang/NoClassDefFoundError: java/lang/Object
As you can see, running commands like "zmhostname" and/or "zmlocalconfig" will produce the "NoClassDefFoundError" error.
To download JDK:
2) Pick "JDK/JRE - 5.0" then "5.0 Update 17", then click "Go"
3) On the next page click on the link that displays "Download JDK"
4) On the next page select your platform, select multi-language, and click on the "I agree" license
There's only two options for Linux for dowload:
32 Bit jdk-1_5_0_17-linux-i586.bin 64 Bit jdk-1_5_0_17-linux-amd64.bin
5) Once you have downloaded the *.bin file, transfer it to the Zimbra machine in the /tmp directory.
To install JDK: (using jdk-1_5_0_17-linux-i586.bin as an example)
1) zmcontrol stop **run as zimbra**
2) mv /opt/zimbra/jdk1.5.0_17 /opt/zimbra/jdk1.5.0_17.OLD **run as root**
3) chown 755 /tmp/jdk-1_5_0_17-linux-*.bin **run as root**
4) cd /opt/zimbra **run as root**
Note:This is basically extract JDK into the /opt/zimbra. IIRC, there is EULA where you'll have to use the space bar to get to the bottom of the EULA to indicate yes or no.
6) chown -R zimbra:zimbra jdk1.6.0_13
7) Test again with the zmhostname or zmlocalconfig commands.
8) zmcontrol start **run as zimbra**
My rationale for this page was that it took me a long time to figure out where to download the proper JDK file. Hopefully this will help those who are in need of installing JDK for linux, and are not quite savvy with Sun's website.