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

Bitbucket is for the code that takes us to Mars, decodes the human genome, or drives your next car. What will your code do? Get started with Bitbucket today, it's free.

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 

Bitbucket is the Git solution for professional teams who code with a purpose, not just as a hobby. Get started today, it's free.

Topics:

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

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

X

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

{{ parent.tldr }}

{{ parent.urlSource.name }}