[warning] /usr/bin/freemind: No java runtime was found

I tried firing up freemind on my Ubuntu 12.04 machine and it gave:

theos:$ 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

I’d configured the $JAVA_HOME and $JAVA_CMD variable and checked symbolic link for default java:

JAVA_HOME and JAVA_CMD image

Symbolic link to default Java

Opened up the /usr/bin/freemind and saw that there was a function findjava which should have worked as I already have $JAVA_HOME and $JAVA_CMD as environment variables.
Going through the file, reached line: 151 and saw that there was a condition to source /usr/lib/java-wrappers/java-wrappers.sh if the file exists – which actually existed.

Was in bit of hurry so just took a quick backup of /usr/bin/freemind and changed it from:


151 if [ -r /usr/lib/java-wrappers/java-wrappers.sh ]
152 then # the Debian method
153 . /usr/lib/java-wrappers/java-wrappers.sh
154 require_java_runtime java6
155 else
156 findjava
157 if [ $? -ne 0 ]
158 then
159 exit 1
160 fi
161 fi

to


151 if [ -r /usr/lib/java-wrappers/java-wrappers.sh ]
152 then # the Debian method
153 # . /usr/lib/java-wrappers/java-wrappers.sh
154 # require_java_runtime java6
155 #else
156 findjava
157 if [ $? -ne 0 ]
158 then
159 exit 1
160 fi
161 fi

It’s not the best way and probably will have to redo it after freemind update happens on the system but it took me way less than to write this post. So now, I’ll just get back to drawing the mind map that I was about to.

2 thoughts on “[warning] /usr/bin/freemind: No java runtime was found”

  1. Hello,

    Thank you for your post. I did the same and it worked. It was looking for an old version of java (version 6). That code should be outdated.

    Bye

Leave a Reply

Your email address will not be published. Required fields are marked *