Hello,
to use NetBeans you only have to install xcode in the app store, then you go to xcode, preferences, downloads, components and install the item that says Command Line Tools. After that your netbeans will work perfectly
Sorry for my bad english.