These instructions assume you have downloaded a recent version of NetBeans (at this time 8.x), installed and launched it.
Select the Available Plugins Tab
click the install
button below. Follow the Wizard instructions to install the plugin
Startup Eclipse and click Help
->Install New Software
. You should get this dialog
Paste https://www.codenameone.com/files/eclipse/site.xml
for the location to Work with and press Enter.
Select the entries & follow the wizard to install
Download & install IntelliJ/IDEA. Notice that Android Studio will not work.
Install the plugin using The Plugin Center
Use the search functionality in the plugin center to find and install the Codename One plugin.