Bash script to manage multiple Java Development Kits installations
Let's see:


There's no need to use return in the last statement of a function. By default, the return code of the last command is returned anyway.
Using backticks for evaluation is deprecated - you should use $(command args) instead. It is also more readable.
Use More Quotes™. The current script does not handle even whitespace in file names, much less newlines or - at the beginning.
Indent consistently, otherwise it's difficult to follow the code.
Are you sure you need to initialize the symlink?
Don't parse ls output.