NetBeans has compile on save!

Today I downloaded the newest daily build of NetBeans 6.5. To my (pleasant) surprise, the "build project" menu item was grayed out. Yes, that means that NetBeans now compiles your files once you hit the save button. This also means that "Run" action is now mostly instantaneous because all files have already been built while as you worked on them.

To verify that "compile on save" works properly you can open your build directory in the "Files" tab and then right click on the file to see the file size (or open a file manager and watch the file size in the file manager). Make some changes to your sources and then once you save the file check whether the appropriate file size has changed in the build/classes directory. You should see that the file size of the class you edited has change on save because the .class file has been updated.

I was looking for an option to disable "compile on save" and found it in project properties in the "Compile" section. So if you don't like automatic compilation, you can turn it off, although it is enabled by default when you create a new project.


Nice! How is the user experience when something doesn't compile?

Posted by Alexis MP on červenec 27, 2008 at 07:36 dop. CEST #

awesome! :)

So now I can't add autoreloadable=true to my web.xml and then save and voila, servlet reload upon save!

Keep up the good work netbeans engineers!


Posted by cvasilak on červenec 27, 2008 at 08:52 dop. CEST #

This is great!
Does it mean that it is equivalent to the
incremental compiler of Eclipse??

Regards, Peter.

Posted by Peter on červenec 27, 2008 at 09:10 dop. CEST #

NetBeans had incremental compilation before (errors are highlighted as you type). What was added is that classfiles are replaced as you save the java classes, which allows much faster builds/deployment. So yes, I believe this is what Eclipse does.

Posted by Roman on červenec 27, 2008 at 09:27 dop. CEST #

Hi Roman,

yes you are right it is the same thing.
Please see here:


Posted by Peter on červenec 27, 2008 at 02:51 odp. CEST #

Nice. However, I notice the Task Scanner run by default in the nightly builds and it takes eons to finish it's job. Couldn't even find an option to turn it off by default. Mighty pesky thing as compared to 6.1.

Posted by Rohan Ranade on červenec 28, 2008 at 01:46 dop. CEST #

Oh my gosh, finally! =) I hope is works on files other than .java!

I can't wait until 6.5 becomes stable.

Posted by Karl Pietrzak on červenec 28, 2008 at 07:32 dop. CEST #

> I hope is works on files other than .java!
Karl, which files do you have in mind?

Posted by Jan Becicka on červenec 31, 2008 at 03:41 dop. CEST #

Roumen, please add another feed for "core" info :)

;) -

Posted by Lukas on srpen 04, 2008 at 02:08 odp. CEST #


Posted by 害虫駆除 on srpen 26, 2008 at 04:34 dop. CEST #

One easy way to push Sun hardware sales:

Prepare simple and very practical Solaris manual and CDs.

Keep information simple. Sure lots of Linux users will buy Sun box.

Remember, manual MUST be simple and useful. If i know linux very well, i will not bother to read tons of document to use Solaris. Because most of work does not need.

Posted by peter yang on srpen 27, 2008 at 10:55 dop. CEST #

Not trying to attract lin-ux users(or ms-ux users). :) It just isn't simple, wasn't simple, will never be simple. Pick up an old Solaris 8 or 9 software box, and you'll realize it's heavy, complex stuff. Always has been, always is, always will be. Not kids stuff, you know. No need to push Sun hardware sales, it selss itself. As for Beans...Could just call it SunTM BeansTM. Keep the brand simple, stupid. :)

Posted by sun on říjen 11, 2008 at 02:32 odp. CEST #

The Star

Twinkle, twinkle, little star!

How I wonder what you are,

Up above the world so high,

Like a diamond in the sky.


When the blazing sun is gone,

When he nothing shines upon,

Then you show your little light,

Twinkle, twinkle all the night.

The dark blue sky you keep

And often thro' my curtains peep,

For you never shut your eye

Till the sun is in the sky.


'Tis your bright and tiny spark

Lights the traveler in the dark;

Though I know not what you are

Twinkle, twinkle, little star!

Posted by aoc power leveling on říjen 15, 2008 at 09:09 odp. CEST #

At The Seaside


When I was down beside the sea

A wooden spade they gave to me

To dig the sandy shore.


The holes were empty like a cup

In every hole the sea camp up,

Till it could come no more.

Posted by runescape powerleveling on říjen 15, 2008 at 09:10 odp. CEST #

This feature should be called "Compile on save and run" according to

Posted by Kovica on říjen 29, 2008 at 06:33 dop. CET #

[url=]wow power leveling[/url]
[url=]wow power leveling[/url]
[url=]wow powerleveling[/url]

Posted by alpha on duben 28, 2009 at 10:09 odp. CEST #

Post a Comment:
Comments are closed for this entry.

Roman Strobl


« červenec 2016