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)
1 Wednesday, 08 July 2009 23:44
Dave
Excellent work sir - fixed my ubuntu one as well.
2 Saturday, 11 July 2009 09:03
Jeff_NC
+1, ubuntu 8.04
3 Tuesday, 25 August 2009 12:20
boycer
Nice post; Debian users might prefer to use the command:
$ update-alternatives --config java

...and then select the version of java from the presented options
4 Tuesday, 25 August 2009 17:44
Jeff Channell
boycer - I knew there had to be something I'd missed. :)
5 Friday, 16 April 2010 00:15
Evan R. Murphy
Thanks for figuring this out.
6 Sunday, 23 May 2010 08:37
nessuno
thanks a lot

Add your comment

Your name:
Comment:
  The word for verification. Lowercase letters only with no spaces.
Word verification:

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.

Santorum
Joomla Extensions