« září 2008
PoÚtStČtSoNe
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
     
       
Today

Navigation

Speaker Profile
Roumen's Weblog
Login
Sun Bloggers
Technorati Profile

Am I popular?

Today's Page Hits: 2540

Contacts

Name: Roman Strobl
E-mail: roman dot strobl
at sun dot com

NetBeans

Java Sites

Javalobby
The Server Side
Java Tips
Java Blogs
java.net
java.sun.com
java.cz

Blogs

NetBeans:
Geertjan
Brian Leonard
Gregg Sporar
Lukas Hasik
Ludovic Champenois
Vincent Brabant
Alexis Moussine-Pouchkine
Jullion-Ceccarelli
Tom Ball
Tim Boudreau
Jesse Glick
Petr Blaha
Ruth Kusterer
Jara Uhrik
xzajo
Jan Lahoda
James Branam
nbextras.org

Sun:
Kazem - bug cartoons ;-)
Tor Norbye
Romain Guy
James Gosling
Chief Gaming Officer
Jim Grisanzio
Jonathan Schwartz

Planets:
Planet Netbeans
Planet Sun
Planet Eclipse

Other:
netbeans-blog.org
Joel Spolsky
Bruce Eckel

License info

Creative Commons License
This work is licensed under a Creative Commons License.

Recent Entries

Map of visits

Locations of visitors to this page
« NetBeans Podcast... | Main
20080727 Neděle červenec 27, 2008
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.

Trackback URL: http://blogs.sun.com/roumen/entry/netbeans_has_compile_on_save
Comments:

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

Posted by Alexis MP on červenec 27, 2008 at 02:36 odp. 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!

Christos

Posted by cvasilak on červenec 27, 2008 at 03:52 odp. CEST #

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

Regards, Peter.

http://en.wikipedia.org/wiki/Incremental_compiler

Posted by Peter on červenec 27, 2008 at 04:10 odp. 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 04:27 odp. CEST #

Hi Roman,

yes you are right it is the same thing.
Please see here:
http://wiki.netbeans.org/CompileOnSave

Peter.

Posted by Peter on červenec 27, 2008 at 09: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 08: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 02:32 odp. 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 10:41 dop. CEST #

Roumen, please add another feed for "core" info :)
http://blogs.sun.com/coreqa

;) - http://blogs.sun.com/coreqa/entry/why_is_build_action_grey

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

害虫駆除

Posted by 害虫駆除 on srpen 26, 2008 at 11: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 05:55 odp. CEST #

Post a Comment:

Name:
E-Mail:
URL:

Your Comment:

HTML Syntax: NOT allowed


    Disclaimer: The contents of my blog represent my personal opinions which may differ from official views of my employer, Sun Microsystems.