X

Geertjan's Blog

  • May 8, 2005

NetBeans Modules for Dummies (Part 3)

Geertjan Wielenga
Product Manager
Another way to learn about writing NetBeans Modules (NBMs) is to read as much as possible about them. Here is a complete list of all the resources I've come across while attempting to understand NBMs. I've tried to organize the links in stages, otherwise it's all a bit overwhelming.

Getting your feet wet

  • NetBeans: How to write a HelloWorld module by Jerry Tan. This was the first accessible document I ever read on NBMs. It's short and sweet, even though I later realized that both Jerry and Elan (see below) re-invented the wheel to some extent, because they could have used a NetBeans project template to structure their NBM, rather than doing everything manually.
  • Netbeans RCP In Action in Elan Meng's blog. I learnt two things from Elan: (a) the Ant script that creates an NBM and (b) how to hook an NBM into the NetBeans Platform.

Everything covered in the two links above, apart from the use of the NetBeans Platform (which Elan refers to as the Rich Client Platform), is also covered in NetBeans Modules for Dummies (Part 1) below. I intend to cover the NetBeans Platform soon.


Up to your knees in it


Going under


Is it a bird? Is it a plane? No, it's Maven!

And here is my wish list of things I would like NetBeans to be able to provide for NetBeans Module development:

  • NBM project template. I'd like this template to provide the following: layer.xml with default code, basic Action class with some default content, module entries in manifest.mf, Ant scripts for building the JAR's XML file and the NBM file, together with as few related properties as possible, so that as little customization as possible is necessary.

  • NBM project wizard. I'd like to be able to specify menus, toolbar buttons, and actions in the wizard (as well as anything else that can be defined in the layer.xml file). And the wizard should generate test code for the menus, toolbar buttons, and actions so that I can build and test the NBM as soon as I've exited the wizard. This is why the wizard should also generate an Action class with default code. The default main class should be something like org.netbeans.modules.app-name so that the structure is NetBeans-friendly from the start.

  • layer.xml. Code completion, editor (like for web.xml in 4.1), availability as file template with default content as in Mevenide.

  • Wrapper. I'd like to be able to select a Java application and wrap it in a module. I'd also like to be able to open an NBM file and inspect its sources.

  • Samples. Simple and complex samples in New Project wizard.

  • Documentation. "NBM Quick Start Guide"; "Complete Reference Guide for Layer.xml File"; "NBM Development Code Conventions Document"; "Introduction to NetBeans Sources"; FAQ; Helpfiles.

Join the discussion

Comments ( 21 )
  • Tim Shi Wednesday, August 3, 2005
    I would like to make a module that starts by default when netbeans is launched. Is there anyway to do that?
  • Geertjan Wednesday, August 3, 2005
    I think that's default behavior. By the way, I'd recommend you using a post-4.1 development build (i.e., do NOT use 4.1 for creating plug-ins) and then go to http://platform.netbeans.org/tutorials/ for tutorials.
  • Roman Strobl Thursday, August 4, 2005
    Great list, Geertjan. You can also add link to the tutorials, well, mostly written by you.



    To understand the concepts, I highly recommend this book. Unfortunately it's from the 3.6 ages, but the OpenAPIs haven't changed too much, so I got a lot of unique information from here. The concepts are mostly the same in 4.1 and 4.2 so it's worth reading to get an overview (and to get a deep understanding how the layered filesystems, datasystems, nodes, etc. work).
  • abhisek Thursday, September 6, 2007

    Could you please provide the link to download nbantext.jar I am not able to get it from binary


  • Geertjan Thursday, September 6, 2007

    Why do you need it?


  • Abhisek Thursday, September 6, 2007

    I am just a new comer to netbean plateform.i just want to test the NetBeans: How to write a HelloWorld module posted in http://www.javalobby.org/java/forums/t17711 where build.xml is using that jar.

    Or if any other way for it.please suggest.I dont want to use IDE for module creation.I have downloaded only the blank plateform from netbean.I want to plug swing module into it.


  • Geertjan Thursday, September 6, 2007

    Did you see that JavaLobby article that was written in 2005?! It is completely out of date. It is now completely wrong. Here is how you can create a module in 6.0: http://platform.netbeans.org/tutorials/60/nbm-google.html

    It is much simpler than it used to be, as you will see if you follow that tutorial. And here is a very long list of other tutorials for creating NetBeans modules:

    http://platform.netbeans.org/tutorials/


  • Abhisek Thursday, September 6, 2007

    It is using IDE.I dont want to use IDE.I want have in depth knowledge on configuring the plateform to develop a desktop application.Could you please send me the steps to develop Hello World appl without using IDE .

    My netbean plateform loc: D:\\nb\\Netbeans\\Plateform6

    and my user dir is

    C:\\nbUser

    I am using eclipse as IDE.


  • Geertjan Thursday, September 6, 2007

    I strongly advise you to use NetBeans IDE, because NetBeans IDE provides LOTS of tools to help you create NetBeans modules. Eclipse does not. You are making your life very difficult for yourself if you use a different IDE. It is like using instructions from Ikea to build furniture from Japan. Almost not possible. We have no instructions to help you to o what you are trying to do -- if you want to use Eclipse to develop modules on the NetBeans Platform, you should ask Eclipse for instructions how to do so.


  • Abhisek Friday, September 7, 2007

    I want to learn from scratch.I dont bother difficulties.Please suggest .I am using eclipse only for getting methods from apis imported not for netbean plugin dev.Please suggest me to proceed.It may need some time .i am ready for it.please suggest me


  • Geertjan Friday, September 7, 2007

    If you are using Eclipse, I cannot help you. I simply don't know how to work with Eclipse. Write to this mailing list, maybe they will have someone who can help you: dev@openide.netbeans.org. Again, please understand: I cannot give you advice, because I do not know Eclipse.


  • abhisek Friday, September 7, 2007

    Thanks a lot for your valuable respones. assume that i am not using eclipse.I am not using any IDE .I have one netbean plateform i.e blank plateform.how to plug hello world module into it.

    As given by http://www.javalobby.org/java/forums/t17711

    it was not using any IDE.but the only problem i faced was i didnt get nbantext.jar to download.

    Can you suggest further.


  • Geertjan Friday, September 7, 2007

    No, I cannot suggest further. I don't know the answer to your question, except that you are referring to something written in 2005. It is probably completely wrong now. Please read these words: I don't know. Please join to this mailing list and ask your question there: dev@openide.netbeans.org.


  • abhisek Monday, September 10, 2007

    i build furniture from Japan..:)...its not so difficult .it took 1 week for me.


  • Geertjan Monday, September 10, 2007

    :-) Hurray! Please tell me how... Write to me at geertjan DOT wielenga AT sun DOT com with the instructions and I will blog about it for other people who need to build furnitue from Japan!


  • Abhisek Tuesday, September 18, 2007

    surely i wl post if u want...ijust started doing the coding part...i need small code to go through to understand TopComponent(just opening one explorer window in left side of plateform).waiting for ur help


  • Geertjan Tuesday, September 18, 2007

    http://platform.netbeans.org/tutorials Plus, if you use the Window Component wizard in the IDE you will see how a TopComponent works. (That's exactly why it makes sense to use NetBeans for module development, i.e., because NetBeans provides lots of wizards that help you get started with many APIs).


  • Abhisek Tuesday, September 18, 2007

    Thanks...i am almost done with that...just a simple problem i am facing.In the menu bar i am adding TestComp .this option is coming fine in menu bar.But after clicking it ..under it "balnk" is getting displayed with disable mode.in layer.xml under tag folder name="TestComp" i have given the correct mapping for the action class.waiting for your help


  • Antony Fernando Friday, November 2, 2007

    CMS and Blog Website templates, flash templates,WordPress Themes,Php-Nuke Templates, phpBB Templates for a economical rate web design products for a economical rate


  • rocky Thursday, February 21, 2008

    Hi

    My topcomponent is not getting garbedge collected...when i am opening topcomponent(say tComp) one instance getting od tComp created which is never garbedge collected...whthr netbean is registering something somewhere


  • Eric Wednesday, March 18, 2009

    Is netbeans the kind of api that could be embedded into a website that does a custom build project? Like adding a deck to my house, pick some styles, hieghts, colors, and have it show as a 3D model ? I have seen this at a Lowes homebuilder website and would like to build one of these to look at other concepts.


Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.