Showing posts with label netbeans. Show all posts
Showing posts with label netbeans. Show all posts

Thursday, 5 January 2012

Netbeans 7.1 is out but watch out before you grab that hot cake!

Good news Netbeans 7.1 is out with lots of support for the latest technologies ie JavaFx 2.0, Java EE 6 and JDK 7 but there are a few gotcha's if you decide to jump on-board now.


NB: I'm one of the noisiest Netbeans preachers wherever I find myself trying to win some eclipse souls. I just love the software but these gotchas are so raw I just want to warn you.

Netbeans 7.1 does not work with Subversion 1.7 period! So if you have just bought a new pc and you are setting up a new development environment or upgraded your subversion, or your company uses subversion 1.7, Netbeans 7.1 is not for you.

I now have to downgrade my subversion to use this but the advantages from Netbeans outweigh the downgrade so will have to. I have tried all the hack and command line client noise they usually throw at you and it just didn't work so don't bother trying

  • The JavaFx 2.0 project format in Netbeans have changed since the 7.1 RC2 so if you created your nice JavaFx 2.0 project with any of the previous Netbeans versions, such as 7.0.1, 7.1 beta or any version before the 7.1 RC2, your JavaFX 2.0 project will not run! The ant targets have changed and there is no migration support, so the only option is to recreate a blank project and copy your files manually.
  • Unfortunately, I don't have the patience for some other IDEs so my only options are to downgrade and to copy my files from my JavaFX 2.0 projects but I know its worth doing.
If you have any substantial development going on, then watch out before you grab that hot cake!

Tuesday, 3 January 2012

How to Set VM Arguments for Server in Netbeans - Solving PermGen space effectively

I'm an avid heavy Netbeans user but for some time now I have been fighting with a Horrible PermGen space error when debugging a Tapestry application.

After setting all the Options and environment variables in netbeans.conf, nbactions.xml, as a global environment variable, catalina.bat etc I still couldn't pass the VM options to the registered Tomcat server untill today I realised that, it's in the same place as you register the server!!!

And this took me ages to figure out (yea, daft me! ) so I'm sharing it here for my own reference and for anyone who runs into this.





Tuesday, 3 August 2010

Top 10 Netbeans IDE Java Editor Shortcuts. Required for Daily Editor Usage.

These are my top 10 basic Netbeans Java Editor shortcuts that I use all the time everyday.
Hope it helps you increase your productivity.

1. Commenting. (This works in all Standard IDE editors, not just the Java editor). The commenting works regardless of the language, it will comment it appropriately. You can try it in the css editor or the XML editor


If no text is selected, the current line is commented appropriately.

2.Duplicate Current line.


3.Find implementation of an interface
With the cursor on the name of the interface,

When the list turns up, you can just click to open that class or use the keyboard to select and press enter

4. Fix Imports


5. Open class by name

Supports Camel case search and wildcards
To open any Resource ie css, html, text file use


6.Formatting

if no code is selected, the whole class file is formatted.
The formatting is controlled from that specified in Tools -> Options -> Editor -> Formatting

7.Rename a variable, class or method


8. Insert Some code.
This is one of the most used shortcut. Loads of options just appear when pressed.
The best way to utilise them is to generate getters and setters. declare all those properties,
and then press ALT+INSERT(Insert Key on the keyboard)
It works in a lot of editors, for example, in the html editor, you can easily generate Lorem Ipsum place holder.



9. Toggle Bookmark.
This helps when your file is very large and you keep scrolling up and down.

If the line is bookmarked already, the bookmark is removed and vice versa

10. Navigate bookmarks.
You can easily jump between bookmarks by pressing


Coming up next, Letting the IDE do the unnecessary typing. Stay tuned

Thursday, 10 June 2010

Wow, Netbeans Rocks! Now I understand why the hype

Recently there have been articles where new discovers of Netbeans have gone on to write articles about how cool the IDE does this and does that.

For someone who have been using netbeans on a daily basis EVERYDAY for the past four years, I found those articles to be generally boring as their new discoveries are things I have been using on a minute by minute basis for ages. To me they sounded sooo 2002..lol.

Anyway, at work, everyone uses Eclipse but I refuse to budge so still use Netbeans with the checkstyle plugin so I don't get done for code formatting and it all works smoothly once you setup you editor options. The ecosystem is just perfect. By the power of maven, I don't even touch the eclipse plugin in netbeans. Its all smooth.

However, one thing they always get me on is the eclipse shortcut "CTRL + SHIFT + T". Every eclipse guy knows it. At first I was a bit frustrated so I resorted to the netbeans Quick Search(CTRL + I) but its quite slow so they always moaned during code review as that circle thing kept turning and never brought the class.

Then I discovered the actual netbeans equivalent of "CTRL+SHIFT+T" was actually easy to use. It is "CTRL + O". Wow. Its even shorter that theirs. So these days during code review, I just go "CTRL + O" and there the class is. To even impress them, I just use the capital letters in the class name so for example for "CodeReviewModel", I just go "CRM" and there the class is. Wow!

Then they will go in which project is that class. There I am, stuck so I hover over the filename at the top of the editor and find the filepath and from there I deduce the Project.

Then today it struct me. What is that "Select in" thing at the bottom of the right click menu? It usually was Code folds so you can minimize the size of the file if it was 3000 lines.

I rightclicked again and there it was. I can select the file from the project, file and even in favourites!. Now, that is COOL!
To make it even COOLER, its got shortcuts! "CTRL + SHIFT + 1 " does make it soooooo simple.

I am no new user to netbeans. I even have Netbeans Platform Applications and plugins I have developed, but today am totally impressed I just thought I will let the whole world know, NETBEANS ROCKS!!

NB: I use Netbeans 6.8, the official release at the time of this writing.