The Source for Java Technology Collaboration
User: Password:



Graham Hamilton

Graham Hamilton's Blog

Moving to NetBeans 4.0

Posted by kgh on December 14, 2004 at 06:52 PM | Comments (24)

I enjoy programming. It's part of my job, but it's also something I do just for fun. I like seeing code take shape under my fingers and I like evolving it do interesting things. As part of that, I've tended to take a certain recalcitrant joy in having a direct, simple relationship with my source code, without any uppity tools getting in the way. I admire tools like Visual Basic, but I've tended to tend to think of them as tools for other people.

As part of my job, I consciously make an effort to try out various tools, to understand their strengths and weaknesses. So I've done small projects in Visual Studio (many versions), and JBuilder, and Eclipse, and many other tools. And of course I test run various Sun tools, including various versions of NetBeans. In fact I moved a lot of my personal development to NetBeans 3.6 out of a vague sense of wanting to help provide good feedback. However NetBeans 3.6 was definitely rocky going and if I wasn't intent on understanding it, I would probably have given up. So I initially approached Netbeans 4.0 with some caution.

Well, somewhere in trying out NetBeans 4.0, I found that my brain had betrayed me. I discovered that I wasn't just using NetBeans because I "ought" to - I was using it because it was fun. I found I was creating new projects in NetBeans just because I wanted to knock something to together in a hurry and I knew I could both do it more quickly in NetBeans and have more fun doing it.

Yikes! The tools guys have finally corrupted me!

After getting over the shock, I've now finalized moving all my personal development, including various personal projects at home, over to NetBeans 4.0. It is making me more productive, without undermining my sense of direct interaction with the source code.

The largest irritant for me in previous NetBeans releases had been the project structure, which revolved around rather occult notions of mounting filesystems. That has all been replaced in Netbeans 4.0 with a whole new project infrastructure based on "ant" projects. I find that is working really well. Previously I had been using gnumake, so I am relatively new to ant, but fortunately NetBeans normally takes care of the ant details for me, and I've only occasionally needed to reach into the ant scripts.

Of course I also like that NetBeans 4.0 supports JDK 5.0. I've found that I have become addicted to both generics and the extended for-loop syntax. Having the IDE understand and support those is great. I'm also using NetBeans 4.0 for JSP development, where the integration with the built-in Tomcat engine works really well.

Anyway, if you haven't yet tried out NetBeans 4.0, I'd urge you to give it a whirl. I think you'll find it's a radical improvement over earlier NetBeans releases and well worth serious use!


Bookmark blog post: del.icio.us del.icio.us Digg Digg DZone DZone Furl Furl Reddit Reddit
Comments
Comments are listed in date ascending order (oldest first)

  • I also have given NB4 a whirl, but it is still slow, clunky and feature-starved compared to my usual tool, Intellij IDEA.

    I am constantly using full-featured re-factoring, code navigation and code inspection and nothing, except perhaps Eclipse, comes even close.


    Posted by: goron on December 14, 2004 at 11:51 PM

  • I agree that NB4 is a huge step forward from 3.x but as said it's very slow and clunky.

    Personally I split my time between Eclipse 3.1 and JBuilder 2005, I can't at the moment decide which I like better (or rather if it's worth spending the money to get JB Developer or to stick with the current system of doing most in JB Foundation and using Eclipse for the rest).

    Posted by: jwenting on December 15, 2004 at 12:56 AM

  • cough cough ... I've been in love with NetBeans for quite a long time, and always liked the possibility to just mount everything I like (sources, tests, data files) to make up my classpath, then drag together some distinct folders into a project. which gives me a highly customized project view.

    Setting up the FlyingGuns project for NB3.6 was a matter of minutes, just pointing to a couple of (<20) of source directories and a couple of jars.

    Each file with a main() method could have parameters to run with. All in one ... charming!!

    During the last weeks(!) I tried to setup a NB4 project structure for the same project. HARD STUFF!! I needed to setup dozens of NB4 projects (those that deal with existing sources). E.g. just for the separation cleint/server/shared, you need 3 interdependant projects!
    For each of them I had to define the complete set of dependencies. But make sure that CVS is correctly setup BEFORE you do that, otherwise the jar-dependencies end up as private properties containing absolute pathes.

    For some of my projects - those that maintain their resources in separate directories, I had to modify the generated build files. Thus you have to be *really* fluent in Ant + fluent in the NB4 flavort of Ant!!

    Meanwhile I'm nearly done with that, but its ugly. Instead of my nice project overview, I now have dozens of interconnected NB4 projects which have to be maintained. Building in the IDE takes longer than it does with my own Ant files!

    I also tried the NB4 freeform projects, for I already had a complete set of Ant files to build everything. But you cannot furtheron depend on those projects, they don't allow any debugging w/o modification of the Ant files, still need a lot of settings and so on and so on.

    I tried various IDE. Eclipse, JBuilder. I *never* saw such a complex and hard-to-maintain project setup with such a poor result. At least for non-trivial, single-jar projects.

    I know the new project system has its highlights as well (e.g. the mevenide integration, nice but also pretty useless for everyday's work).

    Maybe I'm too stupid, but I really tried hard with NetBeans, took a lot of effort. And I will stick with it :)

    Posted by: herkules on December 15, 2004 at 05:28 AM

  • I wouldn't hesitate to recommend NetBeans 4.0 to a student. They've taken the IDE interface and cleaned it up nicely; they've made it more usable and easy to understand at first. It's very easy to setup a brand new project (such as programming homework assignments).

    The Form designer further helps students. It seems with just a little pushing, they understand how to create forms and add callbacks.

    The one NetBeans 4.0 downside for students is the somewhat backward options dialog. It's hard to find anything in there. Hopefully that will be updated at some point. Fortunately, the options are something infrequently changed (maybe never changed).

    Having said that, I use Eclipse 3.0 myself. Despite the clunky IDE interface, the Eclipse editor has many powerful features surrounding it, features like mark occurrences, code formatter, code indenter, quick assist on errors, the overview ruler, advanced syntax highlighting, etc... These are all things which a student might not notice or care for, but help us old-timers a great deal.

    Posted by: jtr on December 15, 2004 at 08:12 AM

  • Graham;

    I've been a user of Netbeans for quite some time, and have really enjoyed the productivity gains it offers.

    Sadly, when I tried Netbeans 4.0 at this last JavaOne, I couldn't even setup my projects. I know a lot of people hate the "mounting" metaphor NB pre 4.0 used, but it was great for linking to existing code and projects that you don't want to tie to an IDE. The way I have NB setup, I can link to other code easily and compile outside of the IDE.

    With NB 4.0, it wants to take over all your code and it's too hard to pull in code that you already have out there. This seems to be a major complaint about 4.0 and it seems to me like a big regression.

    Is there something being done by the NB team to fix this issue?

    Posted by: augusto on December 15, 2004 at 08:16 AM

  • I'm surprised at the negative feedback on netbeans, but every opinion must have an owner. :) I haven't tried the final version of netbeans 4.0 as its a large download (in progress), but I'm assuming its much like the beta 2 I've been running with most of the kinks worked out.

    Like you, Graham, I love it. Its the first time an IDE has ever managed to pull me away from CLI project management since I grew out of Visual Basic. It does all the commands I'm used to typing on the command line automatically.

    Perhaps this isn't the IDE for the die-hard IDE users out there that want the IDE to do everything for them. What it is is the IDE for the die-hard CLI users out there that don't know they're ready for a change!

    Posted by: dusty on December 15, 2004 at 05:43 PM

  • Boy, you guys should *really* try out IntelliJ. It doesn't get in the way of you and the code and doesn't try to control your project. Instead it offers up exactly the right smarts when and where you need them.

    If you'venever tried IntelliJ, run, nay sprint I say, and download the trial.

    IntelliJ has managed to convert a lot of die-hard vi and emacs users.

    Posted by: nevster on December 15, 2004 at 07:05 PM

  • I'm surprised at the negative feedback on netbeans, but every opinion must have an owner.
    I like Netbeans BTW ... versions lessthan 4.0

    Just gave 4.1 a try today, and it's still too hard to link existing code to my project. This new version insists on me putting my code on the project folder, and I don't want (and can't) do that. This is a major usability flaw with this version, and I can't believe there isn't a way to "mount" folders like before. It's funny because some people complained about the mounting feature, but the new system is too restrictive!

    Posted by: augusto on December 15, 2004 at 07:26 PM

  • Didn't intend to be negative. Just the new project system ....

    With 4.1, it opens up a bit again, e.g. allowing multiple source directories for a project, which IMHO is the bare minimum for a project system. IIRC a projact may also deliver more than one single jar.

    Unfortunately, the 4.1 project files cannot be used with 4.0 and 4.0 files in turn are converted to 4.1, so it's hard to use the 4.1 prototype just as a 4.0 with added value.

    @nevster: yes, IDEA/IntelliJ is really cool. Best IDE ever, but not for free :(

    Posted by: herkules on December 15, 2004 at 11:15 PM

  • I've been using Netbeans since exactly one year ago... it was slow, but I liked it. Then, for a project I badly needed refactoring, so I jumped on Eclipse... well, now I can say that it's diffucult to go back, because Eclipse changed the way I code, especially the quick fixes: I don't declare any more fields, I just use them and let Eclipse create them thru a quick fix without leaving the keyboard. The same holds for methods, I see the need for a methods, I write the method call and let Eclipse create the prototype by inspecting it...
    There are lots of other examples: what make Netbeans less attractive to me is not the user interface or the project system, it's the code editor, which provides lots of features, and I find myself using them all.

    Posted by: aaime on December 16, 2004 at 05:11 AM

  • odd - i really like the new project system. We have several projects with very complex build requirements (ant scripts generating code, xdoclet passes, mixed Java and C++ etc.) and the new project system lets me link up our existsing Ant scripts with the IDE so I get the benefits of the extreme flexibility of building with Ant, coupled with having an IDE.

    I agree that intelliJ has a fantastic source code editor and great refactoring - no question. But Netbeans 4.0 is actually the first foundations of a lot of new stuff for Netbeans. The new meta data repository should allow a lot more refactoring features, for instance - my feeling is that 4.0 is a baseline release to give the Netbeans team a good foundation on which to build - there aren't a lot of fantastic features yet, but they've got a good base now.

    In my opinion the main problem with Netbeans is their dreadfully confused website and lack of documentation. I think things are improving, but they're still a mess. For instance, I happen to know that there's a great module called "navigator" which shows a structure view of the document you're working on - but I can't find where to download this module anywhere on their website - and I've searched for hours. The search function just turns up a load of stuff from their mailing list from people also looking for the module. The "module database" on the site is woefully out of date, and doesn't seem to list a lot of modules that I know exist somewhere (because i've used them before), and seems to still list lots of modules that have either migrated and merged together or have been abandoned.

    Netbeans really need to sort out their website so that people can easily find and install extra modules like Navigator and the "suggestions" module - these add features that everyone really expects these days on a modern IDE, but they aren't in the standard distribution, and they're impossible to find on the site even if you ALREADY KNOW they exist. For new users that don't know of these things I can understand why netbeans seems impoverished compared to IntelliJ or Eclipse.

    Posted by: jportway on December 16, 2004 at 05:17 AM

  • The feature I love most in the new Netbeans is the Apache Ant integration and the availability of custom Ant targets via the menu. Just one thing drives me nuts: Netbeans replaces relative paths in the scripts by absolute ones. Thus to keep the scripts portable I need to define those Ant properties manually, before importing the build script created by Netbeans.

    However, since the Ant integration allows me to do whatever I want, I love the new project system. I have no problem with the restriction to one source path for each project - for other paths I just create a new project. Via Ant shared resources can be easily linked together, e.g. by putting them on the classpath. Shared build targets and properties can be imported using the Ant "" element.
    Because each sourcepath is an own (sub-)project, you get a very clean layout of your whole project structure.

    Together with JDK 1.5 Netbeans runs lightning fast on my Linux system. I use a 1.8MHz system with 512MB RAM, giving Netbeans a maximum of 128Mb. I also use it on other workstations. Under MS Windows systems Netbeans seems to be somewhat slower (like all portable apps).

    Posted by: joergwassmer on December 16, 2004 at 05:34 AM

  • Yeah, where's the navigator?

    I think I also had in one of the beta/dailybuilds/RCs. But where did it come from? Really liked it.

    Posted by: herkules on December 16, 2004 at 07:09 AM

  • I love NetBeans 4.0! I have been using it for quite some time now and I think it is a huge jump from 3.6. I also had issues with the speed for a while, then I tweaked the netbeans.conf file so that it uses 256M and it flies now!

    I also had to adjust to the new ant format, but once you figure out how to convert existing projects...it is not hard to do. I look forward to seeing newer versions of 4.1 early next year!

    Posted by: juneau001 on December 16, 2004 at 07:20 AM

  • gets harder when you are not allowed to write NB specific stuff to the existing Ant files ....

    Posted by: herkules on December 16, 2004 at 07:33 AM

  • I can understand that it may be harder to convert projects coming from an existing Ant structure. I have always used NetBeans previously...so all of my code is coming from the old file structure. Ant is new to me with NB 4.0.

    Posted by: juneau001 on December 16, 2004 at 07:40 AM

  • Netbeans 4 is a vast improvement, and the team deserves kudus.

    That said, I'm still hoping that someone will "improve" the search and replace feature.

    Posted by: johnreynolds on December 16, 2004 at 11:23 AM

  • I migrated my project not from NetBeans 3.x but from an existing Ant makefile.
    Code editing, classes, methods are great, but it was difficult to try to get debugging inside our existing Ant file.
    For those doing this, I recommend and use the "Attach to debug". I run our product with debug options, then attach from NetBeans. Breakpoints, examining variables work great this way - as does profiling by attaching.

    Great job guys & gals

    Posted by: ralphc on December 16, 2004 at 12:41 PM

  • Navigator: will be in standard 4.1
    "search & replace": 4.1
    4.1: Apr/2005

    -Trung

    Posted by: ttran on December 16, 2004 at 01:10 PM

  • it's good to know navigator will be standard in 4.1 but it doesn't really address the point that the netbeans website, documentation and plugin database is so arcane that it's impossible to find the interesting stuff.

    I've been using netbeans for several years, so at least I have some idea what I'm looking for - it must be absolutely baffling to anyone coming at it for the first time.

    Posted by: jportway on December 16, 2004 at 05:36 PM

  • Projects suck. Ant is 'teh d3\/!1'.

    I quite liked 3.6. Mounting filesystems is a unixy kind of metaphor. Takes a small mental adjustment and then you're away laughing.

    Doing development build stuff in Ant... is stupid. Its an IDE I should just push the build button and it should know what to do. Ant should only come into it when deployment to different environments is an issue.

    I think they just hand it off to Ant because it makes life easier for them by removing the hard decisions, and shunting them off onto the users.

    Ah well, I'll always have notepad, ext/lib, and jar files.

    Its funny when you can churn code out faster than the mugs with their 'productivity' tools.

    I *do* like the Tomcat integration in 3.6, very nice for quick testing of servlets.

    Eclipse is just rubbish. Its worse than most betas, crashes ~10 times a week for me at work. And when it crashes, it crashes hard (futzes a dll, requires a reboot). On the same kind of machine at work, Netbeans 3.6 only crashed once, and it was a soft crash. Eclipse is an extremely immature product and is not ready for prime time.

    Posted by: rickcarson on December 16, 2004 at 09:37 PM

  • Ive been using netbeans for about 6 months now; previously
    a dedicated xterm+vi+ man, I too am
    hooked on using NetBeans ... 4.0 is much better than 3.6,
    although the auto-refactoring can be a pain while reshaping
    interdependent APIs

    I also have recently started using 5.0 Generics and autoboxing
    and I wonder how I ever did without them!

    - Larry

    Posted by: lpgc on January 03, 2005 at 10:51 AM

  • "Doing development build stuff in Ant... is stupid. Its an IDE I should just push the build button and it should know what to do. Ant should only come into it when deployment to different environments is an issue. "
    I have to disagree here - I feel that your dev environment should build using the same process as you will down the road when you go into production - from the start of a project ( my build file is usually the first thing I do ). I am not a NB guy - I have been happy with Eclipse for at least a couple of years now ( IntelliJ is sweet but not free, as in ... ). I have eclipse configured to call ant targets for all builds even it's internal code compilations.I shut the door on NB4.0 after I discovered that I couldn't use my own ant build file, and that NetBeans had control over this master build file ( ie: it makes it's own changes etc ... ).If you like Makefiles, use Makefiles, if you like Maven, well, that's your problem. If you like the magic where you don't have a clue of what's going on, so be it - but the IDE shouldn't lock it down like that.

    Posted by: bhmckendrick on January 14, 2005 at 10:26 AM

  • Here is an update on Installing Netbeans IDE 6 M10

    Netbeans 6 Milestone 10 implements many of the new features of NetBeans 6.0 and is available for download here.

    The following installers are available:

    * Basic. Contains tools for programming in the Java language including Profiler and the Matisse drag-and-drop UI design tool.

    * Standard. Provides tools for developing Java SE and Java EE applications and includes the Mobility pack for creating applications for mobile devices. This download option includes the GlassFish v2 application server software, which is a Java EE 5 platform-compatible server for the development and deployment of Java EE applications and Java technology-based web services. The Standard installer allows you to customize your installation by selecting the tools and runtimes you want to install.

    * Full. Extends the functionality included in the Standard download with the tools for Service Oriented Architecture development, constructing Unified Modeling Language diagrams, and programming in the Ruby language. The Full installer allows you to customize your installation by selecting the tools and runtimes you want to install.

    I shall demonstrate the installation using the FULL installer. For more installation options and customizations, you are referred to this link. After you have downloaded the installer start the installion process for the nos system:

    etch-desktop:/home/amit# ./netbeans-6.0m10-full-linux.sh --javahome /home/amit/jdk1.6.0_02/
    Configuring installer...
    Search JVM on the system...
    Extracting installation data...
    Running installer wizard...

    Posted by: bookworm02 on September 22, 2007 at 12:40 AM





Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds