Skip to content
Attila Kelemen edited this page Mar 18, 2018 · 9 revisions

In case you want to build the source code, you will need latest version of NetBeans. Opening the project is done the usual way (File/Open Project).

You should have to following properties set in ~/.gradle/gradle.properties:

  • "netBeansExecutable": The absolute path to the executable (including the executable, not just its containing directory) you are using to start NetBeans. If you don't have this property set, the Run and Debug commands will not work and will ask you to set this property.
  • "jdk6Home": If you don't have this property set, the plugin you build will not be able to load projects using JDKs with lower version number than what you used to build this plugin.
  • "jdk8Home": If you don't have this property set, the plugin will be built with whatever JDK you have set as the default JDK. Which means, that you will need to run NetBeans with a JDK version you used to build the project (or higher version number).

For example on Windows, you might have something like this in your gradle.properties:

netBeansExecutable=C:\\Program Files\\NetBeans 8.2\\bin\\netbeans64.exe
jdk6Home=C:\\Program Files (x86)\\Java\\jdk1.6.0_45\\bin\\javac.exe
jdk8Home=C:\\Program Files (x86)\\Java\\jdk1.8.0_92\\bin\\javac.exe
  • Run: Starts a new instance of NetBeans which will have an initially empty user directory in build/testuserdir and therefore changes made to this newly started NetBeans won't affect your installed version of NetBeans. The started NetBeans will have this plugin installed but nothing else, so if you need something, you will have to install it. If you don't clean the project (remove the userdir directory), your settings will be remebered if you "run" the plugin again.
  • Debug: The same as with run but debuggin enabled. You can set breakpoints and do anything like with other projects.
  • Build: Builds this plugin and creates the nbm file which you may use to install the plugin manually. Though, if you build the plugin it won't be signed but it doesn't really matter if you install it for yourself. You will find the output nbm in /netbeans-gradle-plugin/build/nbm.
Clone this wiki locally