The above did not work for me on Ubuntu 12.04/GNOME Shell with FreeMind 0.9.0 installed from the Ubuntu repository, this set up:
freemind
[warning] /usr/bin/freemind: No java runtime was found
[error] /usr/bin/freemind: Unable to find an appropriate java runtime. See java_wrappers(7) for help
java -version
java version "1.7.0_10"
Java(TM) SE Runtime Environment (build 1.7.0_10-b18)
Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)
sudo update-alternatives --config java
There are 2 choices for the alternative java (providing /usr/bin/java).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/lib/jvm/java-7-oracle/jre/bin/java 12 auto mode
1 /usr/lib/jvm/java-7-oracle/bin/java 4 manual mode
2 /usr/lib/jvm/java-7-oracle/jre/bin/java 12 manual mode
Press enter to keep the current choice[*], or type selection number: 0
whereis java
java: /usr/bin/java /usr/bin/X11/java /usr/share/java /usr/share/man/man1/java.1.gz
ls -l /usr/bin/java
lrwxrwxrwx 1 root root 22 May 16 2012 /usr/bin/java -> /etc/alternatives/java
Actual Path:
ls -l /usr/lib/j*
/usr/lib/java-wrappers:
total 20
-rwxr-xr-x 1 root root 1033 Apr 2 2011 get-classpath
-rw-r--r-- 1 root root 9122 Jan 12 15:42 java-wrappers.sh
-rw-r--r-- 1 root root 2302 Jan 12 15:41 jvm-list.sh
/usr/lib/jvm:
total 4
lrwxrwxrwx 1 root root 26 Sep 6 11:56 default-java -> /usr/lib/jvm/java-7-oracle
drwxr-xr-x 8 root root 4096 Dec 13 12:37 java-7-oracle
Troubleshoot:
"/usr/lib/java-wrappers/jvm-list.sh" has the below setting, which is correct path.
#va-wrappers(7) default runtime
__jvm_default="/usr/lib/jvm/default-java/"
The 2 error are coming from /usr/lib/java-wrappers/java-wrappers.sh, which doesn't seem to be loading the below from within it's file.
# Import the list of JVMs
. /usr/lib/java-wrappers/jvm-list.sh
I changed it to,
./usr/lib/java-wrappers/jvm-list.sh
but it did not work.
Solution:
This is what worked after trial and error by adding the below in the /usr/lib/java-wrappers/java-wrappers.sh file, under where it is trying to find,
if [ -z "$JAVA_HOME" ]; then, at line 90 in vi for me.
#DIRS=""
# Added 2013-01-12 not being found from jvm-list
DIRS="$__jvm_default"
#DIRS="/usr/lib/jvm/default-java"
I commented out DIRS="" variable and changed it to
DIRS="$__jvm_default"
or
DIRS="/usr/lib/jvm/default-java"
Both of them worked.