NetBeans development

Discussion in 'Java' started by markspace, Jul 31, 2011.

  1. markspace

    markspace Guest

    I'm kinda bored with some other Java development stuff I'm working on,
    so I decided to learn something new.

    Does anyone want to collaborate on learning NetBeans development? Not
    the platform, I mean the NetBeans source code itself. While NB is
    pretty good, I often find I think of little features that I might want
    to add. Right now, I have no knowledge how to do that. So I figured I
    should learn.

    Anyway, here's how I got started:

    1. Get Mercurial (source code control) if you don't have it.

    2. Do a manual copy of the NetBeans source base:

    $> hg clone http://hg.netbeans.org/main

    I love how simple Mercurial commands are, btw.

    C.f. <http://netbeans.org/community/sources/>

    3. Start NetBeans and make a new project. Use "Free Form with Ant
    Build File".

    4. Point the sources at the NB clone you made above. Accept the
    defaults for the remainder of the New Project Wizard.

    5. The project will open quickly, but my system took a couple of hours
    to get past "scanning project." Be patient.


    Right now I'm stuck because it seems Antlr doesn't download with the NB
    sources. I'm going to bug the nbdev mailing list about it.

    If anyone does want to collaborate, I figure I'll be working on this
    mostly on weekends, and occasionally during the week. I'd suggest we do
    our collaboration on c.l.j.p if no one objects.
     
    markspace, Jul 31, 2011
    #1
    1. Advertising

  2. On 11-07-31 06:22 PM, markspace wrote:
    > I'm kinda bored with some other Java development stuff I'm working on,
    > so I decided to learn something new.
    >
    > Does anyone want to collaborate on learning NetBeans development? Not
    > the platform, I mean the NetBeans source code itself. While NB is
    > pretty good, I often find I think of little features that I might want
    > to add. Right now, I have no knowledge how to do that. So I figured I
    > should learn.
    >
    > Anyway, here's how I got started:
    >
    > 1. Get Mercurial (source code control) if you don't have it.
    >
    > 2. Do a manual copy of the NetBeans source base:
    >
    > $> hg clone http://hg.netbeans.org/main
    >
    > I love how simple Mercurial commands are, btw.
    >
    > C.f. <http://netbeans.org/community/sources/>
    >
    > 3. Start NetBeans and make a new project. Use "Free Form with Ant
    > Build File".
    >
    > 4. Point the sources at the NB clone you made above. Accept the
    > defaults for the remainder of the New Project Wizard.
    >
    > 5. The project will open quickly, but my system took a couple of hours
    > to get past "scanning project." Be patient.
    >
    >
    > Right now I'm stuck because it seems Antlr doesn't download with the NB
    > sources. I'm going to bug the nbdev mailing list about it.
    >
    > If anyone does want to collaborate, I figure I'll be working on this
    > mostly on weekends, and occasionally during the week. I'd suggest we do
    > our collaboration on c.l.j.p if no one objects.
    >

    I'll collaborate. I already cloned the repo. My motivations for digging
    into this are pretty much the same as yours.

    I'll get stuck into it more tomorrow - it's Natal Day in Nova Scotia
    tomorrow so it's a paid day off.

    AHS
     
    Arved Sandstrom, Aug 1, 2011
    #2
    1. Advertising

  3. On 11-07-31 06:22 PM, markspace wrote:
    [ SNIP ]
    >
    > 5. The project will open quickly, but my system took a couple of hours
    > to get past "scanning project." Be patient.

    [ SNIP ]

    Further caution: if you've got an older PC then you might have annoying
    problems. This is a good-sized project with lots of files.

    I found that on my oldest dev box - a 3.0 GHz Linux PC with 2 gigs of
    RAM - that an initial attempt with a NetBeans-computed Xmx setting
    failed miserably; it wanted to go with about 380MB which is way
    inadequate. NetBeans in this scenario starts failing to compile source,
    and if you don't pick up on that in your NetBeans messages.log file your
    scanning will have failed very soon but the IDE will keep on failing for
    hours with you no more the merrier.

    Yes...I was no more the merrier. Until after many hours I got suspicious
    and checked messages.log. :)

    Hardcode your netbeans.conf and make the Xmx setting as high as you can
    afford. I've already been able to tell that this makes a big difference.
    NetBeans simply will not compute a useful Xmx if left to its own devices.

    You will then very possibly run into a "too many open files" problem on
    Linux. See
    http://www.liferay.com/web/richard.sezov/blog/-/blogs/liferay-java-linux-and-too-many-files
    for explanation and solution.

    I will continue tomorrow evening and report back.

    AHS
     
    Arved Sandstrom, Aug 2, 2011
    #3
  4. markspace

    markspace Guest

    On 8/1/2011 5:11 PM, Arved Sandstrom wrote:
    >
    > Further caution: if you've got an older PC then you might have annoying
    > problems. This is a good-sized project with lots of files.


    > Hardcode your netbeans.conf and make the Xmx setting as high as you can
    > afford.


    Good points. I've started playing with netbeans.conf for the first
    time. More info here:

    <http://wiki.netbeans.org/FaqNetbeansConf>

    <http://wiki.netbeans.org/FaqScanningAndIndexingIssues>

    I've turned automatic scanning off now. Even on a decent laptop, it's
    too laggy. The NetBeans project still must scan when it first starts
    up, which takes about 30 minutes on my system. Note that you must heed
    the warnings about manually refreshing once you disable the automatic
    scanning.

    Also, I broke down and built the project manually, with Ant, on the
    command line. It seemed to work without any special options (although I
    had pointed my JDK at Java 7 and the build file warned me that that may
    not work. I manually reset to Java 6 using the user.build.properties
    file, as the warning message recommended.)
     
    markspace, Aug 2, 2011
    #4
  5. On 11-08-01 10:03 PM, markspace wrote:
    > On 8/1/2011 5:11 PM, Arved Sandstrom wrote:
    >>
    >> Further caution: if you've got an older PC then you might have annoying
    >> problems. This is a good-sized project with lots of files.

    >
    >> Hardcode your netbeans.conf and make the Xmx setting as high as you can
    >> afford.

    >
    > Good points. I've started playing with netbeans.conf for the first
    > time. More info here:
    >
    > <http://wiki.netbeans.org/FaqNetbeansConf>
    >
    > <http://wiki.netbeans.org/FaqScanningAndIndexingIssues>
    >
    > I've turned automatic scanning off now. Even on a decent laptop, it's
    > too laggy. The NetBeans project still must scan when it first starts
    > up, which takes about 30 minutes on my system. Note that you must heed
    > the warnings about manually refreshing once you disable the automatic
    > scanning.
    >
    > Also, I broke down and built the project manually, with Ant, on the
    > command line. It seemed to work without any special options (although I
    > had pointed my JDK at Java 7 and the build file warned me that that may
    > not work. I manually reset to Java 6 using the user.build.properties
    > file, as the warning message recommended.)
    >

    I followed your lead on turning off automatic scanning of sources.
    Having said that, with an Xmx of about a gig, and increasing the ulimit
    'nofiles' to 5000, I managed to complete the scanning on that old PC in
    about 11 minutes. It was the open files limits that made all the difference.

    I will also be building manually with Ant on the C.L.

    AHS
     
    Arved Sandstrom, Aug 2, 2011
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Pimousse
    Replies:
    2
    Views:
    3,645
    Roedy Green
    Apr 21, 2004
  2. Ilias Lazaridis
    Replies:
    0
    Views:
    918
    Ilias Lazaridis
    Dec 12, 2004
  3. Thomas G. Marshall
    Replies:
    2
    Views:
    835
    Thomas G. Marshall
    Oct 16, 2006
  4. Sarah
    Replies:
    3
    Views:
    1,549
    David Segall
    Jul 14, 2007
  5. DBoy001
    Replies:
    3
    Views:
    522
    Richard Reynolds
    Oct 18, 2007
Loading...

Share This Page