Java: Too Many Levels of Symbolic Links

After last upgrade Java stopped working on Arch, with following message:

/usr/bin/java: line 2: /usr/lib/jvm/default/bin/java: Too many levels of symbolic links
/usr/bin/java: line 2: exec: /usr/lib/jvm/default/bin/java: cannot execute: Too many levels of symbolic links

I’ve checked the /usr/lib/jvm folder, and found out that the default symbolic link is pointing to itself. To fix this, I’ve directed it to the correct location:

# ln -s /usr/lib/jvm/java-7-openjdk/jre/ default

Note: The location might be different in your case, just check the content of the /usr/lib/jvm folder.

This is archived version of blog, preventing broken links. This version will stay online indefinitely.