Skip to main content

NetBeans, NYC and Springtime

Posted by bleonard on April 8, 2005 at 10:36 AM PDT

I spent this last Wednesday in NYC on what was probably the first nice day of Spring this year. I arrived from Connecticut via Amtrak into Penn Station. Generally, I take the subway up to the Sun offices near Grand Central Station, however, it was too nice of a day to be
underground, so I decided to walk. It was close to lunch time when I
arrived and the parks were overflowing with folks soaking up the sun.

I was in town to speak at the NY
Java SIG
. My presentation, NetBeans 4.0, 4.1 and Beyond, was to a capacity crowd of about 80 developers. There was lots of interactive Q&A, which is
always a good sign, but it did limit the amount of material I could
cover. I was able to demonstrate NetBeans' revamped UI, it's support
for Tiger, the Ant based project system, J2EE (sans Web Services) and
the profiler. I did not have time for JUnit, J2ME/Mobility or the new
GUI builder. Given the same time constraints next time, I would focus
on Web Services rather than EJBs for the J2EE portion, otherwise, I
believe the presentation was well received.

After the presentation, I jotted down all the questions I could
remember, and in some cases, spent some time after I returned coming up with some more thorough answers than I gave Wednesday night. Here they are for all that may be interested:

Will the editor detect unused import
Yes, but
I didn't know this myself until I tried it on the fly. I added an
import statement then selected fix imports and poof, it disappeared.
Someone, half-jokingly, pointed out that the line containing the import
statement should also be deleted. Turns out it is, unless that import
statement is added to the bottom of the list. I filed a href="">defect
against this corner case.

Can you pass parameters into the Ant Script?
Yes, via the Advanced dialog of the Run Target
submenu on an Ant script (you can see the "Advanced..." item on the submenu in the image below).

My build script has lots of "private
targets", can I prevent
these from appearing in the Run Target menu?
Yes. Target names
that begin with a dash, e.g., "-do-init", will not appear in the Run
Target menu. Also, only targets with a description will appear in the
main Run Target menu. Targets without a description will appear in the
"Other Targets" sub-menu.

Does NetBeans support multiple web interfaces
to a project? I
haven't been able to get this to work with any other IDE.
I don't
see why not as you would just create another web-module project. Give
NetBeans a try and let me know if you encounter any problems. (I also
spoke to this guy for about 10 minutes after the session. He mentioned
some pretty wacky stuff, like 3 different web.xmls for a project, but
he liked NetBeans tight Ant integration and is going to give it a try.
He's currently using Eclipse.).

Which server are you deploying to?
The href="">J2EE 1.4

Q: Your J2EE demo was cute, but how does it work
with REAL J2EE
A: Fine. Try it out and let me know if you run into

Q: Are the Enterprise Resource Wizards (e.g.,
Call EJB),
available from JSPs as well as servlets?
A: You can access the
Enterprise Resource wizards from any Java class in an EJB module or web
application. The Enterprise Resource wizards are not available from JSP

Q: Which version control systems do you
A: CVS, href="">Microsoft
VSS 6.0, href="">Merant PVCS
are part of the standard NetBeans 4.x distribution.  There are
also profiles
for ClearCase, StarTeam, Subversion and TeamWare.

Q: Does your Unit Testing support the Green/Red
Graphical Result
A: It is possible to code your test case to launch
JUnit's Swing GUI,
however, it is not integrated into the IDE as you may expect.
Integrated support for this UI is planned for the JUnit module.

Q: XDoclet Support?
A: Yes. Since XDoclet is merely a set of
Ant tasks, and the NetBeans project system is based on Ant, XDoclet
integrates easily into the NetBeans environment.

Q: When selecting part of an application to
profile, is it
possible to set the filter at the package level
(rather than at the method level)?
A: Yes. You can create a Customer
Filter which includes only the packages you're interested in profiling.

Q: Could the API used by JFluid, which injects
bytecodes on the
fly to instrument the code, be used for other intentions, like say, a
A: JFluid uses the href="">JVMTI API.
JFluid's "attach on the fly" capability will only work when (a) the
user who wants to attach is on the same machine as the target VM and
(b) is the same user who started that VM or a super-user.

Q: Does the IDE generate the necessary Ant
targets to launch my
J2ME app in the various configured emulators?
A: The IDE launches the
application in the emulator based on the
property set in You may either change this setting or override the
properties on the command line to launch your application in other
emulators when running Ant outside the

Related Topics >>