run-java-tool was invoked directly

The problem

For some locally installed programs, for example Eclipse SDK, when you try and invoke them you will see the following error:

    run-java-tool was invoked directly  
    run-java-tool should only be used via symlinks to it

By locally installed, I mean java programs that you are running from somewhere in your home directory, rather than those which have been installed using emerge.

The workaround

This problem seems to be related to the way Java is managed under Gentoo Linux, and while we wait for a fix as the real solution, you can do the following (as root) to allow your programs to work.

    cd /usr/bin  
    rm java  
    cp run-java-tool java

While I am not sure of the long term consequences for doing this in your Gentoo installation, it does solve the problem. I will post an update here, if there is anything you need to do to remedy the situation once an official fix is produced

For more information on how java is managed in Gentoo Linux, visit http://java.gentoo.org