Presentation of NetBeans 4.0 - Plugins
Contributed by Jean-Baptiste Renaux as part of the Win With NetBeans
This article is part of a three article series:
Java applications can work on mobile phones, interactive televisions; they are an eldorado for Java. Sun provide a development kit for J2ME. This one is integrated in NetBeans, by installing the mobility kit.
You will get him by this web address: https://netbeans.org/kb/trails/mobility.html
Then, you will get J2ME templates, libraries and emulators:
Create a J2ME Application
We'll use a template project, to explorer the different functionalities of the mobility plug in:
Select File -> New Project (Ctrl-Shift-N).
Choose the sub-category " Mobile " -> " Mobile Application "
Click on Next, and name the project " MyJ2ME " .
By letting all the par default choices, click " Finish " .
You'll see that NetBeans has used a template class , with this elements :
- the startApp() method
- the pauseApp() method
- the destroyApp() method
- the commandAction(Command c, Displayable s) method
- the class extends the MIDlet class, and implement the CommandListener interface.
You can run the project, which will start in a cellular phone emulator.
We can create diferents configurations, allowing us to use our project in diferents contexts.
- Select the project in the Project tab, perform a right-click ,and select " Properties ".
- At top of the window, in the combo box, select " Add configuration ... ". Name the new configuration " WithKeyboard ".
- Unselect the check box " Use values from Default Configuration "
- In the " Device " combo box, select " Qwerty Device ", and click on OK.
Now, we will start our project with the " WithKeyboard " configuration :
- Perform a right-click on the project and select " Set as main project ", to ensure this project is the main one.
- In the tool bar, we have to select our configuration, as shown below :
- Finally, we have to execute the project by selecting " Run -> Run main project ... " .
- You'll see the selected emulator, named QwertyDevice, executing your j2me software.
Configurations allow furthermore to select an obfuscation level, how is created the jar file, how is created the javadoc, ...
J2EE with Sun Application Server
The next version of NetBeans will provide a key feature, which is the integration with Sun Application Server 8.1. Furthermore, an EJB and Web Services support will be added. These functionalities are yet reserved to expensive IDE.
The aim of this plugin is to provide a powerful and flexible profiling solution that is tightly integrated into the IDE workflow. By using it, you'll have an "overhead vision" of your java software while they are executing.
It will be released on April 2005, and some functionality are already usable in the beta version.
If you want to test it:
- Download the module on http://profiler.netbeans.org/index.html.
- Once unzipped, you have to select the .nbm file in the menu " tools -> update center -> install manually modules. "
- Once installed, go into the Project tab, you have to select the class of your project which contains the main() function, and finally select in the menu Profile -> Profile file ...
In the beta version, you have to use a 1.4 java virtual machine. Consequently, if you have a 1.5 one, you can either select the "-source 1.4" argument with the compiler, or install a 1.4 one. Only the second item completed on my computer.
Here are some screen shots:
This window allow you to create different profiling configurations
Threads are shown in beautiful visual reports
NetBeans have got a wide variety of " plug-in " to support other languages like C/C++, Fortran, ... or even UML. A profiler, allowing to test your application's performance has been released too. We won't take about them here, we let you do it by your own :-). Although, most of the plug-in are available for the 3.6 NetBeans release, and they are not usable with the fourth version. We hope it will be arranged soon.
Plug-in list: http://plugins.netbeans.org/
- A large palette of built-in functionalities : xml, documentation, databases, tomcat ...
- attractive to work with java on desktop, web and mobile applications.
- J2EE modules won't be released until spring 2005, on the 4.1 version
- most of the " plug-in " are not available for the fourth version.
NetBeans allow programmers a great ease of development, by taking charge of difficult and secondary parts of your projects. By using NetBeans, you will save time, money, and free your mind. Consequently, you can concentrate easily on your code.
http://www.netbeans.org: Official NetBeans web site
http://java.sun.com: Official java web site, where you can download NetBeans in a java-integrated bundle.