The Netbeans Launcher works not so well with Gentoo Linux' Java environment.
I did install Netbeans trough the Installer and OpenJDK via the package dev-java/icedtea-bin
, which installs to e.g. /opt/icedtea-bin-7.2.5.3/
.
Now the Netbeans Installer would hardcode netbeans_jdkhome="/opt/icedtea-bin-7.2.5.3"
in the ~/.local/opt/netbeans-8.0.1/etc/netbeans.conf
file. Of course, this path breaks on the next (minor) update of dev-java/icedtea-bin
.
Simply commenting out the netbeans_jdkhome
line does not work due to the way Gentoo uses its eselect
mechanism for selecting a system/user Java VM implementation from a variety of installed ones.
nbexec
s autodetecting of the java executable fails because of the run-java-tool.bash
script to which /usr/bin/java
gets symlinked.
I hope the symlinkery gets clear from the shell session below, if not, I'd be happy to supply more information.
For the curious, setting netbeans_jdkhome="/etc/java-config-2/current-system-vm"
manually makes nbexec
skip the autodetection and just use the java
that it finds there.
I think the best way on a Gentoo system would be to skip autodetection completely and just use what is java
in the path (e.g. at /usr/bin/java
and to trust the selected application from eselect
.