How can I enable Compile on Save
in Apache Netbeans IDE 11.0?
Output of my java -version
java version "11.0.4" 2019-07-16 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.4+10-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.4+10-LTS, mixed mode)
I tried setting:
compile.on.save=true
in nbproject/private/private.properties
compile.on.save=true
in nbproject/private.properties
compile.on.save.unsupported.javafx=true
in nbproject/private.properties
compile.on.save.unsupported.javafx=false
in nbproject/private.properties
and possible combinations of these. But not to succeed so far.
TLDR:
You may be seeing this issue because you need to install the nb-javac library. To determine whether installation is necessary:
If installation is required there will be a message stating "Install nb-javac Library" in the Notifications window:
To install the nb-javac library:
A wizard for installing the library will be shown:
Complete the steps in the wizard. Once installation is complete, restart NetBeans.
After restarting NetBeans you should find that:
I could reproduce your problem in NetBeans 11.1, and I have verified that this solution worked for me.
Notes:
The nbjavac plugin needs to be installed. See also here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With