SalkinD
SalkinD

Reputation: 783

Netbeans - Use correct JRE for debugging on Kubuntu

I know this question has been asked before, but the solutions do not work.

I've installed a new jdk 1.8 and configured it as platform. In netbeans.conf I've configured netbeans_jdkhome="/home/niklas/Java/jdk1.8.0_65/".

using update-alternatives I've configured the new jre for java. java -version correctly returns "java version "1.8.0_65"

Nevertheless running my project from inside netbeans it does not load, instead the "javafx requires newer version" error appears.

When I run exactly the same project with java -jar it runs correctly.

What did I forget to configure?

Upvotes: 0

Views: 60

Answers (1)

SalkinD
SalkinD

Reputation: 783

After long try-and-error here my solution:

the standard ubuntu package seems not to contain javafx. Therefore netbeans has to be installed from netbeans downloadpage.

Step-by-step solution:

  • Uninstall netbeans (e.g. sudo apt-get remove netbeans)
  • Download netbeans-8.1-javase-linux.sh
  • Run sh netbeans-8.1-javase-linux.sh --javahome /[PATH_TO_JDK]/jdk1.8.0_[VERSION] (note that this installer fails without warning if you use [PATH_TO_JDK]/jre/)
  • Edit [INSTALLATION_DIR]/etc/netbeans.conf
  • Make sure netbeans_jdkhome="[PATH_TO_JDK]" points to the right path (it didn't in my case.) and has no # before

note that the "All"-linux installer from the downloadpage is broken today (11.11.2015). Maybe this will be fixed soon.

Upvotes: 0

Related Questions