Saturday, 11 April 2009 21:22
I encountered this error after reinstalling my OS (Ubuntu Linux, for the record) while trying to compile something with the Flex 3 SDK. A quick Google search didn't show anything, so I started digging.
The problem ended up being bad symlinks in /etc/alternatives.
jeff@mini:/etc/alternatives$ ls -l java* lrwxrwxrwx 1 root root 34 2009-04-11 21:51 java -> /usr/lib/jvm/java-gcj/jre/bin/java lrwxrwxrwx 1 root root 33 2009-04-08 20:23 javac -> /usr/lib/jvm/java-6-sun/bin/javac lrwxrwxrwx 1 root root 43 2009-04-08 20:23 javac.1.gz -> /usr/lib/jvm/java-6-sun/man/man1/javac.1.gz lrwxrwxrwx 1 root root 14 2009-04-11 21:51 javadoc -> /usr/bin/gjdoc lrwxrwxrwx 1 root root 30 2009-04-11 21:51 javadoc.1.gz -> /usr/share/man/man1/gjdoc.1.gz lrwxrwxrwx 1 root root 33 2009-04-08 20:23 javah -> /usr/lib/jvm/java-6-sun/bin/javah lrwxrwxrwx 1 root root 43 2009-04-08 20:23 javah.1.gz -> /usr/lib/jvm/java-6-sun/man/man1/javah.1.gz lrwxrwxrwx 1 root root 33 2009-04-08 20:23 javap -> /usr/lib/jvm/java-6-sun/bin/javap lrwxrwxrwx 1 root root 43 2009-04-08 20:23 javap.1.gz -> /usr/lib/jvm/java-6-sun/man/man1/javap.1.gz lrwxrwxrwx 1 root root 40 2009-04-08 20:23 java-rmi.cgi -> /usr/lib/jvm/java-6-sun/bin/java-rmi.cgi lrwxrwxrwx 1 root root 39 2009-04-08 20:23 java_vm -> /usr/lib/jvm/java-6-sun/jre/bin/java_vm lrwxrwxrwx 1 root root 38 2009-04-08 20:23 javaws -> /usr/lib/jvm/java-6-sun/jre/bin/javaws lrwxrwxrwx 1 root root 48 2009-04-08 20:23 javaws.1.gz -> /usr/lib/jvm/java-6-sun/jre/man/man1/javaws.1.gz
Somehow 'java' was linked to java-gcj instead of java-6-sun. I went ahead and manually fixed it:
jeff@mini:/etc/alternatives$ sudo rm java [sudo] password for jeff: jeff@mini:/etc/alternatives$ sudo ln -s /usr/lib/jvm/java-6-sun/bin/java /etc/alternatives/java
...and now Flex 3 compiles once again!
Last Updated on Wednesday, 22 April 2009 21:51
Comments (6)
Add your comment
Latest Articles
Most Popular
The Joomla!® name is used under a limited license from Open Source Matters in the United States and other countries. Jeff Channell is not affiliated with or endorsed by Open Source Matters or the Joomla!® Project.




$ update-alternatives --config java
...and then select the version of java from the presented options