You can write your code in your favourite text editor or, more preferably, you could use an IDE (Integrated Development Environment), such as Eclipse or Netbeans. Both IDEs have a recommended plugin available for more MIDlet oriented functions: EclipseME for Eclipse and Mobility Pack for NetBeans.
You can also use Sun’s Wireless Toolkit, and other mobile Java development environments, but you should remember that if you are developing your MIDlet for Nokia devices, it is advisable to test the application with Nokia emulators (as well as on real devices), as the generic emulators behave differently from Nokia emulators and Nokia devices.
For more detailed installation instructions, see document Development environment requirements
NDS and its successor, Carbide.j, are both no longer supported by Nokia and are not any longer available for download. Both Eclipse and NetBeans IDEs have their own MIDlet tools that take care of the functions Carbide.j originally provided. Nokia recommends using EclipseME with Eclipse and Mobility Pack with NetBeans.
For further information, see document The status of Carbide.j at Forum Nokia.
Different phones have different sets of APIs, and the SDKs provide a compatible set of APIs for each device (and an emulator to test the MIDlet on). Nokia devices are based on platforms (like Series 40, S60, and Series 80), editions (1st, 2nd, and 3rd edition so far), and Feature Packs. Each device belongs to one of platform edition / feature pack combination.
For example if you are developing an application for N70 smart phone, which is a S60 2nd Edition Feature Pack 3 device, you should be using that specific SDK to develop the MIDlet on. If you are using an earlier SDK version, some of the APIs might be missing. If you are using a newer SDK version, you might end up using features which are not available on N70. Additionally the emulator of the S60 2nd Ed FP 3 SDK provides the closest emulation of that specific device of all the available emulators.
Prototype SDKs are meant for developers, who are targeting future devices. The prototype SDK contains a number of APIs which are not yet implemented on any device, but which will be available on future devices. With the Prototype SDK the developer can start developing his/her application before the devices are launched, so the MIDlet can be distributed to the marketplace earlier.
The emulators of these Prototype SDKs are based on reference implementation of future devices, not on real device / platform software like in Platform SDKs. Hence the implementation of UI and new APIs might not be exactly the same as on real devices. Hence, always test your application on final SDKs and on real devices.