Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

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

DZone's Guide to

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

· Java Zone
Free Resource

Learn how to troubleshoot and diagnose some of the most common performance issues in Java today. Brought to you in partnership with AppDynamics.

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 

Understand the needs and benefits around implementing the right monitoring solution for a growing containerized market. Brought to you in partnership with AppDynamics.

Topics:

Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}