How-To custom WTK NetBeans and IntelliJ IDEA
How to get your favourite manufacturer emulator into IDE
"Where did you get this Sony Ericsson emulator?" or "How did you get this Sony Ericsson emulator in your IDE?"
These are often asked questions that I often get from variety of forums and at university from younger fellow students.
There is nothing difficult about obtaining emulator for your favourite mobile manufacturer. Just visit their homepage and somewhere there you will find link/option to go developer section of the site which besides variety of technical specifications on most of manufactured models, often even going years back, you can find tools section, tutorials and even forum for dedicated discussion with other community members.
Where to get SDK to work with emulator of your phone?
Sony Ericsson Developer World
Under Docs & Tools select Java section. Here you can find link to download Sony Ericsson SDK 2.5.0.3 for the Java™ ME Platform
Forum Nokia is place to look for any Nokia development tools.
Select Devices,Docs & Tools >> Tools. Click Platforms option in bullet points list and download one of the SDK platforms
MOTODEV – The Motorola developer network - , one of the easiest to navigate.
From top menu select Platforms >> Java ME. On the page scroll down till you find SDKS in Java tools, click here you are ready to download.
LG Mobile Developer Network
From top menu select Docs & Tools >> Java and you will find SDK for download
Samsung Developer Club
Select Resources from menu bar. From drop-down menu of categories select SDK
HTC
At the present I was not able to find any official section for developers through their website. There are few forums run by community and I would recommend The HTC Wizard Web as the one with most knowledge and experiences.
BlackBerry Developers
From the menu navigate through Java Application Development >> Development Tools & Downloads and here you are ready to download. I found this site to be one of the best designed Java sites and easy to navigate compare to SE which is to heavy and Samsung which I think is lousy.
How-to Sony Ericsson on NetBeans
I expect that you successfully downloaded and installed your favourite SDK and you ready to set it up with your IDE. In my case I downloaded and installed Sony Ericsson SDK and this is by default installed under Windows as C:\SonyEricsson\JavaME_SDK_CLDC\WTK2.
Step 1.
Once NetBeans are up and running, we need to select Tools in menu bar and from drop-down menu select Java Platforms.

Step 2.
Java Platform Manager window will pop-up and display list of platforms registered with NetBeans. In my case as you can see it shows that I have JDK 1.6 registered with NetBeans and also Sun Java Wireless Toolkit 2.5.2 that I got with together with installation of NetBeans. Here you will choose Add Platform

Step 3.
In next window select Java ME MIDP Platform Emulator

Step 4.
At this point NetBeans will scan your computer directories to locate any WTK on it. Depending on the speed of computer this may take few seconds or few minutes. Once this process is over you should be presented with some results.

Troubleshooting Step 4.
In worst case scenario when no WTK is found for whatever reason, press Find More Java ME Platform Folders... and navigate to installation directory. Once you reach location of the WTK folder, select/highlight this folder and press Select. NetBeans will scan the folder and if suitable it will add it to the list of Platform Folders as you see on previous image.

Step 5.
As you can see from the image in step four, NetBeans come back with two folders OnDeviceDebug and WTK2. I used previously both and from the short period of use I cannot say what are differences between these two. As being plain lazy I will go with WTK2 folder and press Next. NetBeans will collect data from the folder and present you with list of available emulators.

Step 6.
Once you press Finish button new Java platform, WTK2, is added to the list of platforms registered with NetBeans and you can hit the Close button.

Test
Create new mobile project File >> New Project >> Java ME >> Mobile Application. Give a name and select the location for the project. once you press Next you will be presented with following window where you can select which Emulator Platform you wish to use, you can select device and adjust device configuration and profile.

How-to Sony Ericsson on IntelliJ IDEA
I use IntelliJ IDEA now for over a year with student version acquired by my university (With little help of persuasion from my side.) and I really enjoy it. I was looking for some alternative beside NetBeans. Obvious choice should be Eclipse, but I do not really warm-up this IDE even if it has numerous plug-ins to help with mobile development and huge support from Nokia. Let’s blame Nokia for that failure to know better this IDE (I do not like their phones
).
Following steps works for IntelliJ IDEA ver.8, so start-up IDEA and let’s get rolling.
Step 1.
From menu bar select File and Project Structure to get the window as seen on image bellow. In this window you can manage your project and platform settings (manage available JDKs, manage libraries you use in general or assign specific set of libraries to your project and let IDE know where to find them, here you can also choose what will be your default JDK to be used with every new started project).

Step 2.
Select JDKs from Platform Settings, click on the little plus “+” sign and from the drop-down menu select Mobile SDK.

Step 3.
You need to navigate down to emulator directory where you will find WTK2 folder. Select/highlight this folder and press OK button.

Step 4.
New JDK been added to JDKs Platform Settings, only think to do is press OK button to finish it. (At this point I usually remove some of the library/JAR files as I had some very weird error messages when they stay there. I remove cldcapi10.jar, midapi10.jar and midapi21.jar)

Test
Let’s see if new SDK is added correctly. Select File >> New Project >> Create project from scratch and press Next. Provide project name and location, manage module settings (content root and module file location), choose J2ME Module from available module type and press Next. Manage location of your source directory and press Next again. At last you will be presented with list of all mobile SDKs registered with IntelliJ IDEA, select the one you wish to use and press Next. In last window you can manage MID let settings, but this can be also done during the development process.














