Saturday, April 04, 2009

Freemind on Ubuntu

Today i installed JDK6u13 and wanted to try out Freemind , one of the best free mind mapping tools.As i am still very new to mind mapping but a seasoned Java developer , i thought that i will start rolling soon with this tool.But , it turned otherwise.

After unzipping the freemind (binaries for any operating system - max - all inclusive) version to /opt,i chmodED it as executable.Now ,i tried to start it with the shell script file provided and what i got was

Exception in thread "main" java.awt.AWTError: Cannot load AWT toolkit:
at java.awt.Toolkit.getDefaultToolkit(
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(
at java.awt.Window.(
at java.awt.Frame.(
at javax.swing.JFrame.(
at freemind.main.FreeMind.(
at freemind.main.FreeMind.main(
Caused by: java.lang.UnsatisfiedLinkError: libgtkpeer: cannot open shared object file: No such file or directory
at java.lang.Runtime._load(
at java.lang.Runtime.loadLibrary(
at java.lang.System.loadLibrary(
at java.lang.Class.initializeClass(
at java.lang.Class.forName(
at java.awt.Toolkit.getDefaultToolkit(
...6 more

Even though , i installed JDK6u13 and had it as my default java executable after updating the .profile file, then to some how this script was picking up the java from gcj package.

so i started to dig and find out is this happening.Sooner using sudo update-java-alternatives -l i was able to find out that i only had gcj installed and registerd in ubuntu.

X@X-desktop:/opt/Freemind$ sudo update-java-alternatives -l
java-gcj 1041 /usr/lib/jvm/java-gcj

Now, i was in search of a resource which will show me how to get java from JDK6u13 to be my default.After a quick google , i found this.So next set i ran

X@X-desktop:/opt/Freemind$ sudo update-alternatives --install "/usr/bin/java" "java" "/opt/jdk1.6.0_13/bin/java" 1
X@X-desktop:/opt/Freemind$ sudo update-alternatives --set java /opt/jdk1.6.0_13/bin/java

And then started the shell started

Drop me a cooment if this helps you , or you have good mind mapping sites/online book urls.