Over a million developers have joined DZone.

JavaTools Community Tip: Saving Space with Package Names in NetBeans IDE

· Java Zone

Check out this 8-step guide to see how you can increase your productivity by skipping slow application redeploys and by implementing application profiling, as you code! Brought to you in partnership with ZeroTurnaround.

When you have a deep package structure, this takes a lot of space in the left navigation bar in NetBeans IDE. There is a way to truncate the package names when showing them in the Projects window, saving some space: start NetBeans IDE after adding the following to the command line:

 

 

-J-Dorg.netbeans.spi.java.project.support.ui.packageView.TRUNCATE_PACKAGE_NAMES=true

This will make a package named net.java.javatools.projects.interface appear like net.jav.jav.pro.interface in the package tree. Still identifiable, but using less space.

If you are using a Mac, you can do this by editing the NetBeans start file: on Applications, right click on the NetBeans.app file and select "Show package contents". Go to Content/MacOS and edit the NetBeans file. Look for a line starting with "eval launchNbexec " and add the truncate option. It should look somewhat like this:

          eval launchNbexec \
--jdkhome '"$netbeans_jdkhome"' \
-J-Dcom.apple.mrj.application.apple.menu.about.name=NetBeans \
-J-Xdock:name=NetBeans \
'"-J-Xdock:icon=$progdir/../nb6.0/netbeans.icns"' \
--branding nb \
--clusters '"$netbeans_clusters"' \
-J-Dnetbeans.importclass=org.netbeans.upgrade.AutoUpgrade \
-J-Dnetbeans.accept_license_class=org.netbeans.license.AcceptLicense \
${netbeans_default_options} \
-J-Dorg.netbeans.spi.java.project.support.ui.packageView.TRUNCATE_PACKAGE_NAMES=true \
'"$@"'
;;
From: JavaTools Community Newsletter, Issue 171 

The Java Zone is brought to you in partnership with ZeroTurnaround. Check out this 8-step guide to see how you can increase your productivity by skipping slow application redeploys and by implementing application profiling, as you code!

Topics:

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}