An Open Source Fascicule

Author: Jay Mahadeokar


NetBeans has released its latest version - 6.1! Here is a quick overview of the latest features as described on official NetBeans website.

" NetBeans IDE 6.1 supports a wide range of open source scripting technologies and offers improved performance. This release extends language support beyond Java technology by providing a rich set of features for C/C++, Java Script and the Ruby language, including Ruby on Rails.

NetBeans IDE 6.1 also contains all of the improvements made in 6.0 including: the new smarter editor, next generation of the ground-breaking GUI builder (formerly known as Project Matisse), visual mobile designer, integrated profiler, and Java EE 5 support.

One of the downloads available is an Early Access preview of support for PHP. Advance versions of new modules, such as a JavaScript debugger, support of ClearCase, AXIS, and Hibernate are available as separate plugins. "

Download the NetBeans IDE 6.1 here.

See the details of the release here.

Finally we can get our hands on the new version! So, keep NetBeaning!


The NetBeans 6.1 Beta blogging contest which kicked of 14th March 2008 had the whole community riding an a new blogger wave that saw many new and old developers turn into technical writers as the expressed their likes and dislikes about the NetBeans IDE 6.1 Beta.

The contest ended on 18th April 2008 and in the process we witnessed some of the most brilliant articles and thoughts that gave a deep insight into the NetBeans world and also showed the awareness and enthusiasm of the community for NetBeans. The netbeaners around the world not only presented useful tutorials and tricks but also brought out certain ideas which would help to make our IDE better.

Here are links to some of the insightful and delicious blogs posted by the participants:

1. Tushar Joshi was probably had the most happening and active blog where he explored many aspects of NetBeans from mercurial to Eclipse. He also gave some insightful reviews including things that netbeans must do to survive as well as reasons why he uses NetBeans. Hats off to you for the brilliant blogging!!

2. John' O Connor gave an interesting insight into the UTF-8 encoding scheme in NetBeans 6.1 Beta and brought up a good point that could be thought upon.

3. Lucio Benfante provided at this screencast, in which he creates a new project with Parancoe and NetBeans 6.1.

4. Adam Myatt explored the new sharable libraries feature and documented what he found in a nice fashion.

5. Bruno Ghisi presented a cool tutorial on making a Hello world SunSpot Application using NetBeans 6.1 Beta.

6. Dustin explored the JavaScript support in NetBeans IDE 6.1 Beta beautifully.

7. Harshad Oak compares NetBeans VS Eclipse VS JDeveloper in an interesting manner.

8. Xykon found a possible bug in NetBeans 6.1 RC1.

9. Charles Ditzel speaks about Ruby and javascript.

10. And Oh!! Roman Strobl presents the future plans of NetBeans which will become an online IDE.

There were many more fascinating entries which might not be covered in this post. Feel free to give the links in the comments.

The contest successfully brought out the passion for NetBeans throughout the community and reconfirmed the outstanding popularity for the NetBeans IDE.

The winners are to be announced on 12th May. Best luck to all the hopefuls!! And Keep Blogging!!

Not many people would argue when I say that NetBeans is right amongst the best IDE available. I have certainly realized that as I keep exploring it day in and out. I am a real newcomer to this field, so me commenting on improving the IDE might not be so appropriate. Still, here I will present my thoughts on what students like me would love to have in our IDE.

I will not comment on any technicalities which would require an in-depth knowledge and experience and I am a complete no-no in that regard. So if I got some things wrong, please correct me. I hope I speak for several other students all around who might have felt the same things.

  1. Stability

Stability is a relative term and if I say that the NetBeans IDE is “instable”, that would be the biggest blunder that I would ever make. Having said that, there are certain times when I have seen NetBeans 6.1 Beta giving me start-up problems as I have already mentioned before. I have had no such issues till now while working with NetBeans 6.1 RC1.

  1. Embedded Development Support

I have already voiced my opinion before that it would be really nice if NetBeans could provide support for embedded development, which will not only attract more audience but also increase the popularity of the IDE. I am not sure about the feasibility for this but I think its worth givng it a thought.

  1. Improved C/C++ support

Currently to start working with C/C++ in NetBeans we have to externally install WinGW or cygwin. Is it possible for NetBeans to provide built-in support for these components?

One more thing: The C/C++ module requires working with make file, which is used only for relatively big projects. For complete newcomers who start learning programming, C language is the base on which they are told to build on. Can’t NetBeans provide a basic C/C++ compiler support? (Take for example DevC++ or TurboC, also Microsoft VC++ provides support for console application through C). Such a facility would enable young programmers start learning the basis of programming on the IDE itself and thereby get used to the look and feel of the environment.

People might argue that this violates the basic concept of an integrated development environment, which is supposed to be meant to make easier development of large scale projects, and the students must first master the basic programming skills to come and work within the IDE. That’s absolutely fine. But then there would be no harm if young students can straight away get accustomed with their future while they build their basics. Who would not love to write his first hello world C program in a brilliant visual environment rather than on notepad or blue screen of TurboC?

  1. New releases and its integration with old ones

I have wondered about this before. When a new version of NetBeans is released (which happens atleast once every 6 – 12 months) then we have to download the whole pack again. Why cant an update facility be provided which will just provide updates and changes for the new version? I have currently got three NetBeans IDEs installed – 6.0, 6.1Beta and 6.1RC1. Wouldn’t it be better if the older version was just updated with new features of the next version? This facility is not there as far as I think. I don’t know regarding the feasibility of this idea, but I would love if it is provided.

  1. Support for community Docs in IDE

It would be great if we can support development of community docs within the IDE. I have blogged about this before.

  1. Android Development support

Google Android is probably the next big thing that’s going to make news in the time to come. The Android SDK is freely available and the programming is done in our own java. Although there is a plug-in (Undroid) for android development in NetBeans, there is no official NetBeans plug-in yet. I would love to see progress in this area.

  1. Start-up speed

Well this had to be there isn’t it? Although NetBeans 6.1 has 40% faster start-up than earlier version, there must still be scope for improvement. (I hate mentioning this - Look at start speed of Microsoft Visual Studio for example.)


The NetBeans Innovator Grants have been announced and I love what I see there. The prospects of PL/SQLEditor, PDFViewer, NbPython, NetBeans spot, Visual Java FX among others seem mouth watering for me!

All said and done I am completely fascinated with our IDE and am proud about it! So I thought why not try to make THE BEST, BETTER!!

This article is an afterthought on one of my earlier posts – NetBeans addiction syndrome and its side effects, where I have told how addictive and irresistible NetBeaning can be.


One of my teachers happened to read the post and was not very pleased with what he saw. According to him, at this stage of my student life, I should be keen on learning the underlying concepts that hold the key to programming and build a strong base that is important if you want to survive in software field rather than jumping on the application side and using all the built in functionality offered by IDE that is so tempting for anyone to use.


I have pondered over the thought for quite some time now. Is it right for me at this stage of my career to dive into the NetBeans world and explore the captivating functionality and ease it has to offer, use all the facilities which make our job so easy or should I be devoting my time towards grasping the basics?


Yes. NetBeans is one of the best (if not THE BEST) when it comes to developing projects that would require large amount of time if done without the IDE. So its perfectly natural for young students like me to get fascinated by the built in features and support it has to offer and use them more and more.


But then when will I learn how exactly the control flows through the java desktop application which is created within seconds by the IDE? Instead of using the JSF Crud generator directly shouldn’t I learn to write database queries, establish connection strings and then do the business logic for creating the web application? The answer as far as I think is yes!!


Another way of looking at things is – I am going to go out into the software industry two years from now. What do I expect there? There is a very high possibility that I will be working on an IDE when I finally land up there. So what is going to help me out there? The basic programming know-how or the expertise in working with the IDE!


I think a student must somehow achieve a correct balance to succeed. Not only he should work on grooming the basic concepts in programming, but he should also be well rehearsed with upcoming features and trends that modern integrated development environments have to offer. It’s a fine balance, but that’s the beauty of programming for me!!


I would love to hear what opinions experienced software professionals and industry people have in this delicate topic. Also the thoughts of my fellow students are welcome.

Introduction:

NetBeans 6.1 comes up with new JSF Crud generator. Lets try and explore..

I must confess I have no prior knowledge of JSF and learned it through the tutorial, “Using Java Persistence API within a Visual Web JSF Application”. So if any of concepts are wrongly presented here please excuse me.

In the above tutorial we learn first to create a table in Database and then use NetBeans 6.0 JSF functionality to create a page that will simply display table contents. The tutorial thus guides us in making Hello World example for Web Application through NetBeans.

If you go through the tutorial you will realize the steps and coding that is required to simply display the data from one table.

Here we will explore the new JSF crud generator feature in NetBeans 6.1 and see for ourselves how easily we can create a database application using its features.

Three steps in creating the Application:

  1. Setting up the web project:

1. We will use the sample derby database that comes up with NetBeans for our application. (jdbc:derby://localhost:1527/sample)

To connect to database: Goto services tab >> right click on [app on App] >> connect.

2. If you expand the tables node, following tables will bhe seen:

Note: The users table was added by me when I followed the tutorial mentioned at start.

  1. Create a new Web application. In the frameworks window click on Visual Web Server faces.

Now the project has been set up.

2. Creating the Entity classes from database:

1. Right click project >> New >> Entity Classes from database.

2. In Data Source select the JDBC / sample

3. The data tables will be shown. Say add all to create classes for all tables.

4. Click on Create Persistance Unit option.

5. Following dialog will be shown. Click create.

6. Click finish. You will see following classes created in Source Package > App node



3. Creating JSF pages from entity classes:

1. Now goto WebPages > Resources and right clict >> New >> JSF pages from entity classes.



2. All entity classes will be shown. Say Add all.


3. Click next. The Wizard will ask you to specify the JSF Pages folder. Browse and specify it properly. Thats where your page will get generated. In my case it was WebApplication1\WebPages\Resources\

4. A new file WelcomeJSF.jsp will be added to the directory. Open it and try to understand what is actually happening. Also explore the new files created in the Sources folder. You will realize the amount of coding the generator does for us.

5. Now just Right Click WelcomeJSF.jsp and say Run File. That’s it!!


Output:

A new web page will appear as follows:

Click on any of the links, say Product code items. You will see following page:

Thus options for selection, Editing, Deleting, Adding new data all are provided for us. Easily navigation links are also provided.

Conclusion:

Thanks to the new JSF crud generator in NetBeans IDE 6.1 we are just clicks away from representing our whole database through robust and well designed web pages. So if you have a database ready and want to create a web application representing it, think of NetBeans 6,1 and JSF Generator will be at your service.

Again.. Hats off to NetBeans!!


Important Note:

I realized later that a similar thing was also tried by David Heffelfinger-2 as presented here.
Though he tried doing it in NetBeans 6.1 Beta and got some bugs.



Why is it that drug addicts and computer aficionados are both called users?

Well.. If you ask my mom to describe my behavior in the recent past she will just replace the word computer in the above quote with “NetBeans 6.1 Beta” (And I am not lying when I say that).

While we find a strict contrast between drug users and addicted NetBeaners like me, both do have a certain striking similarities in their behavioral manners and general tendencies towards life. So I have coined a new term for those crazy bunch of idiots and their addiction.

We can call it Netbeans Addiction Syndrome!! (NAS)

I am certainly suffering from this weirdo disease and I am proud of it. But in the process me and my surroundings have faced certain side effects which I would like to mention here.

I don’t like mentioning it… But I have my VI Semester University Exam starting 17th April!!! So I should be ratto-ing the boring System Programming and the stupid flow-charts and the yawning mass of theory right now. But when I open the text-book, a voice comes from within me which yells at me. “What a waste of time you are doing!!” And I close the book, open the PC and start NetBeans 6.1 and then… That’s it! 4- 5 hours of NetBeaning! That until my mom comes and gives me a reality check…

I mean how can one concentrate on reading how compile and go loaders worked, or remember flowchart for conversion of two–pass macro processor into one-pass macro processor, when he has more that half his mind on the coolest and trendiest features that NetBeans has to offer? Ok even if you somehow try to focus on the job at hand, how can you not want to get back to the simplicity, modularity, ease and speed offered by NetBeans for making any application you may dream?

And the biggest problem with this NAS is that you don’t yet have any antidote!! You can just surrender yourself as an NASer and hope that it will release you out of its hold so that you can pay attention to your surroundings.

So I will strongly recommend young students or developers who aspire to become a NetBeaner – Think twice before you enter this world!! It may cost you your exam, it may drastically distort your daily routine, and looking further you may be at a risk of loosing your girlfriend! (You don’t think of anything else once you are a NASer)

Having said that I am really proud of being a NetBeaner and love every minute of it!!

(Note: I had topped my University Exams last Semester. My poor parents and teachers think I will repeat the same again!!)

In my last blog we saw how we can build on top of NetBeans Platform development application suite using an existing module. Now lets explore the feature further. Lets see how easily we can create a zip distribution of our project..

Actually there is not much to see as such. But I found it so cool that I thought it would be worth sharing. Hope you like it…

Just Right Click the suite application >> click Build Zip Distribution.

After about 1- 2 minutes a “projectname.zip” file will get created in project\dist\ path.

After unzipping the file I found following folders:

  1. Platform8 – This must have come because my module depends on platform8. Please correct me if I am wrong.
  2. ProjectName – This folder contains many sub folders consisting of project tracking information and also core jar file of the project as well as the module jar files.
  3. etc – It contains .cluster and .conf files related to the project.
  4. Bin – It contains the executable file for the project as well as .exe file for windows. (And the icon also looks cool!)

That’s it!! You have got a perfect zip distribution that is ready to be exported wherever you want.

I think a developers life cannot be simplifies any further… Do you agree??


In my last post- New Platform Application development support in 6.1 RC1 we saw how we can use the new Platform app development feature to create a suite project that will help us build on top of the IDE.

Here well try to explore it further.. We will see how we can add an existing module project to the PAD (Platform Application development) suite and use the existing brilliance of IDE to create our own stand alone application.

1. Create a new PAD suite. (Refer to my earlier post)
If you try to run the project as it is now you will see the following in output window:

2. Click on Important Files >> project properties as shown:

A new properties file will open up which will contain information like app.name, app.title, branding.token, and modules..

3. Right click Important Files >> NetBeans Platform Config to see the platform file that will carry the information regarding enabled / disabled modules and clusters in our project.

4. Right click on Modules and say Add Existing.. To add an existing module to project.

I have used the Image module which will help us load images within IDE. See my earlier post Opening Images within NetBeans - Tutorial for more..

Now if you again open the properties file you can see the module information automatically added to the file.

5. Now build and run the project.. Thats it. We have successfully created our first stand alone application on top of NetBeans.. wasn't that quick??
Well the slow part was the time taken by the new project to launch.. I had to wait for best part of 4 - 5 minutes before the new instance of IDE opened up. It was strange because the new instance was a toned - down version of the existing one- only consisting of the module that we added, nothing else..

The output was something like this..



To find our image window click on window >> imageFrame.



Well am certainly fascinated by this new platform application development suite feature. Hope you like it too...



I started exploring the NetBeans 6.1 RC1 pack and it was just a matter of time before I stumbled upon the most striking feature as far as I am concerned...

A seperate module support for NetBeans Platform Application development..

You can visit Platform and Rich Client Application Development page for more comprehensive information.

Although the IDE has always offered comprehensive GUI support for building IDE modules and rich client applications on top of NetBeans Platform, 6.1 RC1 comes up with a seperate module suite for the specific purpose.
The NetBeans Platform Application creates a new empty NetBeans Platform Application. This is an application skeleton, without any modules. It is the starting point for your own rich-client applications.

Just say File > New Project > NetBeans Modules > NetBeans Platform Application



The following project base is created by default:



Its upto us now to explore and use the new feature as per our needs...
Hats off NetBeans for simplifying and providing mouth-watering support for rich client applications. It ought be an appplication developers dream!!

Are you are a complete newbie to NetBeans IDE? Do you wish to get familier with the features and facilities provided by the IDE? Dont know where to start?
Well.. you have the solution here..

Sun Student Cources might just prove to be the kick start you need!

It offers an online cource for learning Real World Technologies -- NetBeans GUI Builder, JRuby, JavaFX, and JavaME in an easy assignment based approach. This course is designed to give university students exposure to exciting and leading-edge technologies that are being used in real-life software development environments.

It covers 4 topics:
1. NetBeans GUI Builder
2. JRuby
3. JavaFX
4. JavaME.

This course will allow students to get going as quickly as possible with these technologies. Students are expected to do the lab exercises and then submit homework assignments

You can complete the cource in three steps:
1. Register for the course.
2. Read material/Tutorial provided. (as web pages or pdfs)
3. Submit the small assignments.

The course provides just what a newbie would like to learn in an easily digestable manner. It consist of five modules which will brief you with the related concepts. Each module is followed by a brilliant tutorial will guide you through your first small project using the IDE.

There is also a discussion forum where all doubts can be discussed and solved.
And what more??
After completion of the course you will get a cool certificate:
(This is certificate which I got when I completed the Solaris course that is also provided for students)



So what are you waiting for? Get registered and start NetBeaning!! Believe me its worth your time...


The Netbeans 6.1 Release Candidate is now available..
It has the following new features..

1. JavaScript Support
2. Performance Enhancements
3. Spring Framework Support
4. New MySQL Support in Database Explorer
5. Java Beans Support
6. JSF CRUD Generator
7. Ruby/JRuby Support
8. Javadoc Code Completion
9. Support for Popular Web APIs
10. RESTful Web Service Support
11. Sharing Projects (AKA Sharable Libraries)
12. New Update Center Modules

More information available here..

You can download NetBeans IDE 6.1 here.

Java Beans functionality that had been dropped in NetBeans IDE 6.0 has again been provided in IDE 6.1 Beta with some new features. I tried to explore the new features in my own way. Frankly speaking, I had to start from the scratch. I didn’t even know what a java bean is five days before!! So please excuse me if I have misunderstood any concept.

For the starters..
NetBeans 6.1 Beta has included the following new bean functionality (as mentioned in the NetBeans IDE 6.1 Release Candidate Information)
1. Bean Patterns in Navigator
2. Generate Bean Property
3. BeanInfo Editor
I tried to find it first hand…

Creating a new Image Bean
I tried to create a simple bean that will have a function to display any image. The bean created will reside in the palette so that we can drag and drop it just like any other control in the palette. Here’s how we can go about creating the bean..
Starting the project..
For loading and displaying the image, we will make use of JAI API.
Create a sample java project and name it as ImageBean.
Now right click on source package >> select New >> Other >>Java Bean object.

NetBeans 6.1 Beta provides following options for bean development:
1. Java Beans Component
: Creates a new JavaBeans component. The created skeleton code contains a sample property and property change support.
2. Bean Info: Creates a new BeanInfo class. The BeanInfo is used as a description of how its associated JavaBeans component should behave and appear.
3. Bean Info w/o icon: It is BeanInfo class without icon.
4. Customizer: Creates a Customizer panel for a JavaBeans component. The customizer can then be used during design time in the IDE to configure the bean.
5. Property Editor: Creates a PropertyEditor class. Property editors are used at design time in IDEs to support editing of the properties of JavaBeans components.


Adding the essential code:
1. For simplicity, we will go with the Customizer panel. So, add a new Costomizer panel to our project and name it as ImageBean.


2. Now add a new jInternalFrame to the panel, rename it as imageFrame.

3. Add the following packages at the top in source tab.

import java.io.File;
import javax.swing.JFileChooser;
import javax.media.jai.PlanarImage;
import com.sun.media.jai.widget.DisplayJAI;
import java.awt.BorderLayout;
import java.awt.Container;
import javax.media.jai.JAI;
import javax.swing.JScrollPane;

4. Add the following private variables to class. These will be required to load and display the image.

//To load the image file
PlanarImage srcImage = null;
//To display the image file
DisplayJAI srcdj = null;
JScrollPane srcScrollPaneImage = null;
//To choose file by browsing
private JFileChooser FileChooser = new JFileChooser();
//This flag will be set once image is loaded for the first time
public boolean flag;

5. Also add the following method to the class. This method will load the image into the bean according to the specified path.

public void displayimage(File path ) {
// Load the image which file name was passed as the first argument to the application.
srcImage = JAI.create("fileload", path.getPath());
//When image is loaded for first time...
if(flag == false ) {
// Get the JFrame's ContentPane.
Container contentPane = imageFrame.getContentPane();
contentPane.setLayout(new BorderLayout());
// Create an instance of DisplayJAI.
srcdj = new DisplayJAI(srcImage);
// Add to the JFrame's ContentPane an instance of JScrollPane containing the
// DisplayJAI instance.
srcScrollPaneImage = new JScrollPane(srcdj);
//srcScrollPaneImage
contentPane.add(srcScrollPaneImage,BorderLayout.CENTER);
this.setVisible(true); // show the frame.
flag = true;
}
//If any image was already loaded before
else {
srcdj.set(srcImage);
}
}


The real fun starts now.
The support provided by NetBeans 6.1 Beta for bean development comes into play now.
Right click on the ImageBean class and you will see following options:


Click on the BeanInfoEditor option and following dialog will appear:



Click ok. A ImageBeanInfoEditor will be automatically created for you.
Now a new designer view is provided along with source view for the InfoEditor.
Switch to designed view and you will see the following:




You can see that the designer shows:
1. The bean whose info is being shown
2. The properties of the bean.
3. Event Sources corresponding to the events that will be handled by our bean.
4. Methods that our bean has.

Note that the displayimage method has a red cross corresponding to it which specifies that it has not been included in the bean info. You can right click, and say “toggle include” to include it in bean info.


Alternately you can just check the box for including in bean info as shown:




The changes that you make to your bean will be automatically reflected in the bean info editor. If you add properties or event handlers to your bean corresponding changes can be easily checked out in the bean info. Also the bean patterns can be monitored through the navigator which describes all properties and events of bean.




Compiling and adding the bean to palette.
Now our bean is ready to be used. But before that we must compile it and add it to palette. For that first right-click on ImageBean class and click compile.
Now again right-click >> Tools >> Add to palette.




Following dialog will appear. Select Beans and click ok.



Testing our bean:
1. Create a new jFrame class.
2. Go to palette and select our imageBean. You may have to refresh palette so that the bean is visible.

3. Now after the call to initComponents() method in source view add the following code:
imageBean1.displayimage(new File("C:\\pic.jpg"));
This will call the display image function that we had added to our bean. Pass the path of image that you want to load in the file object constructor.
Now set this class as main class of project and run the project.

Output:
The following output will be seen:


Conclusion:
Thus the new features provided for bean development in NetBeans 6.1 have made making useful bean components a really easy and interesting task. I did not explore the whole facilities provided but for a start I found it really user friendly and easy.
Thanks 6.1 Beta!!

NetBeans community docs wiki is a collaboration space for NetBeans users and developers. It is home to excellent documentation regarding all aspects of NetBeans and provides young developers around the world the much needed kick start as far as diving into NetBeans field is concerned. I as a novice started learning NetBeans using the articles, tutorials and tips and tricks provided in an excellent way in the Docs.

Now I have myself contributed two tutorials to the Community Docs ( RMS Tutorial and Opening images within NetBeans ). It was at this time that the thought passed my mind..

NetBeans Community docs has played a significant role in marketing and popularising the NetBeans IDE specially among the student community (I have experienced it first hand). More and more people are now willing to contribute back to the community and NetBeans in general through tutorials, articles, Tips etc.

Now writing a Doc can be a labourious affair ,I had to open three things simultaneously while writing them:
1. NetBeans IDE to develop and execute the project.
2. Word Document to type in doc.
3. MS Paint to view and edit the screen shots....

Also finding the right guide or tutorial on the WIKI can sometimes be frustrating affair, and many times you dont find what exactly you want even if its there.

So why cant the developers think of providing support for Community Docs within the NetBeans IDE for the next version??
How about a seperate tutorial template that will have facility for typing the tutorials within the IDE according to the standard specifications, including support for managing and editing screenshots, and finally uploading the tutorial on the WIKI all done easily from within the IDE!!

Along with the tutorial support, the IDE can also maintain an index or a qiuck guide kind of a thing that will directly supply the user with the available list of tutorials on any topic of interest. This will not only save the browsing time for the newbies, but will also be helpful and time saving for experienced developers who might get stumbled on silly issus that need to be polished up.

Something to think upon right??

Well when I searched for such a thing I came to know that a Tutorial Module has already been proposed by Ankit Jain, Sumeet Singh & Varun Nischal where in they plan to make a tutorial template for easily posting tutorials.

I think this is a great idea that could be seriously considered by the developers for the next versions.. Hope you agree!

NetBeans claims that it is the only IDE that you need!!

Well if you consider the different project and software development areas you will find that NetBeans IDE 6.1 Beta does offer brilliant development tools for most of them.

The most popular application areas supported by NetBeans IDE 6.1 Beta are:
1. Java
2. Web
3. Enterprise
4. Mobility
5. UML
6. SOA
7. Ruby
8. C/C++
9. NetBeans Modules

Wow!!! That sounds cool!

Is there something missing?? Look at the list again...

Absolutely no support for embedded development!!
One might argue that there is support for the Sun Spot Applications development in NetBeans (refer my article The COOL "Sun Spots"!!)
But Sun Spots are just emerging and have a long way to go.

So what I want to say is why can't NetBeans provide support for Embedded development?

There are robust tools available for the same like Keil which has the best development tools for ARM, XC16x/C16x/ST10, 251, and 8051 microcontroller families.


Keil is not Open Source nor free and my college spent handsome money to buy the tool.
For embedded programmers such tools are very important and if Netbeans ventures in this area and provides support for the same it will not only be great for the community but also help to improve the popularity of the IDE!!

And that will surely take it one step closer to being the only IDE that anyone will need!!

They say that strange things happen to strange people!!

If you have read my previous post "Beta - Start up problem!!" you would be aware of the silly start-up problem that I faced.

Well.. at that time I was able to solve it as described in my post.. "Start-up problem solved!"

But it has now resurfaced.. and how!!!

This time the problem seems to be more troublesome. The IDE doesn't even pretend to start as it had done the previous time. Heres whats happening:

The new problem:

1. When I try to start the IDE absolutely nothing happens...

2. When I look in the processes tab in TaskManager , and double-click on the IDE, the processes:
netbeans.exe and nbexec.exe start for a split second of time and then vanish out!!

3. When I try to delete the folder: C:\Documents and Settings\username\.netbeans\6.1beta the following error is flashed...



Now the most interesting and frustrating part of it is that, my NetBeans IDE 6.0 is working fine!!
Also if I try to delete the "~\.netbeans\6.0" folder no error is flashed and it gets moved safely in recycle bin.

I again resorted to the cheapest way out!! uninstalling and again reinstalling the IDE.

And surprise surprise!!! The thing worked...

I simply cant understand why no one else is experiencing these stupid things.. Is there a special virus on my PC that just affects NetBeans IDE 6.1 Beta???

If any one has the answer or a precaution, please help!!!

I recently stumbled upon a new feature that came bundled up with NetBeans IDE 6.1 Beta, and found it quite interesting.

A Tokens View and AST View window..

These views are of use more so for module developers, and are not meant for end users. For further information visit this post by Geertjan's weblog

To open the Tokens View goto:
Windows >> Other >> Tokens View.



The tokens view shows all the tokens that will be generated by the Lexical Analyzer for the current java file.


Well I found the feature quite cool. I have studied different phases of compiler, including the lexical analysis phase, not long ago (It is in my college curriculum this semester!) I was quite happy to see first hand information of the tokens that were being generated...(This may sound quite stupid!! Sorry for that.. But thats "NOVICE"-ness for you :-) )

I tried to find out the application and use of this feature and found out this brilliant GLF Tutorial
I hope you find this interesting...

Note: Please refer my previous blog to know about the start-up problem i faced.

After a full day of toiling i finally managed to eliminate the start-up problem that I mentioned in my previous blog.

You may find the following information useful if you ever experience the same problem...

Here is an account of what I actually did:

1. The first and most obvious step in such a situation will be, uninstall the IDE and reinstall it!
Well I did the same thing. But during uninstall I got a message telling me that a .lock file exist in my user directory. But I could not stop the uninstall process and the IDE was successfully uninstalled.

2. Then I installed it again and hoped that everything will work out well... But no!! The same old problem again. So now what to do??

I searched about the ".lock" file and found a useful article (You may want to refer it too).
I found out following:

Immediatelly after startup the launcher will try to create a lock file in user directory: $nbuser/lock. If the creation succeeds, the launcher continues to run and allocates a java.net.ServerSocket on local machine and starts listening on it. After that it writes the port number, plus some randomly generated key into the lock file. To prevent problems with shared directories between multiple computers, also the local IP of the computer is written to the file. When the application is about to exit, it stops listening on the port and deletes the lock file (or the file can be marked as deleteOnExit).

Start of the Second Instance: When a second instance of the NetBeans is executed over the same user dir, it fails to create the lock file, so instead of launching second instance of NetBeans it opens the file and reads its content to find out the port and secret key for communication with the running NetBeans instance. When read (but this may fail as well, see next section) the launcher connects to the specified port on localhost (may fail as well), verifies that the running instance recognizes the secret key and if so, it refuses to start new instance of NetBeans over this directory.


3. So, now this solves the first puzzle... and I figured out why after restarting the machine,the IDE atleast tried to start for first time(before quitting with exception) and refused to start after that.

4. Now I deleted the .lock file and ran the IDE. It started up, loaded modules and again the EXCEPTION. I found the .lock file created again. Something fishy was going on...
I concluded that the .lock file was being created by the IDE when it was first asked to start after rebooting the system and not being destroyed. Which means that the loader will think that the IDE is still running even though it has crashed due to exception.

5. Then I decided to take a chance and deleted the complete 6.1beta folder at C:\Documents and Settings\jay\.netbeans\

Fingers crossed!!! I double-clicked on the IDE, and hurray!!! The IDE finally woke up and began running. It did ask me if the settings created by previous IDE (6.0 which I have still kept) should be imported (There was also a folder for 6.0 in the path mentioned above). I clicked on no (Out of instinct!).

I still haven't figured out what went wrong but am sure that some settings in the 6.1Beta folder must have gone wrong!! If anybody has a valid answer or resource where I can find the reason for the exceptional exception I will be more than thankful!

Morale of the story: I case your IDE 6.1 Beta refuses to start, giving a null pointer exception, don't panic, dont restart your machine, don't even uninstall the IDE. Just delete the C:\Documents and Settings\username\.netbeans\6.1beta folder!!!!

Crazy, but it works!

NetBeans 6.1 Beta was working just fine with me..
...until yesterday.
Now it has finally started to show up its "beta"ness.
----Null Pointer Exception during startup!!-----


Before the problem:

I usually hibernate my PC instead of turning it off, and the NetBeans IDE is open most of the time.I was working on the Images module project, and it was all well. I had to restart my PC for some reason.
I dont exactly remember what went wrong. But when i opened the IDE next time it flashed a Null Pointer Exception!!!.

Details of the problem:

Now whenever I restart my PC and start NetBeans for the first time, the wrecked exception comes up to greet me. Here are some of the pertaining to the exception:

Exception popup:



Show Details:Data collected in review and report:



Still More...

When I try to start it the second or third time, a "JFrame" like window opens up.
I can maximise it or close it.


I have reported the problem in NetBeans.

Something for the developers to look into...
For me..

BETA- has shown its first "beta"ness!!

Subscribe to: Posts (Atom)