NetBeans development

M

markspace

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.
 
A

Arved Sandstrom

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
 
A

Arved Sandstrom

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
 
M

markspace

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.)
 
A

Arved Sandstrom

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,734
Messages
2,569,441
Members
44,832
Latest member
GlennSmall

Latest Threads

Top