Add an Entry for Netbeans IDE in Ubuntu 12.04 Unity Launcher


Supposing you installed Netbeans in your Ubuntu 12.04 home directory using the downloaded package from netbeans.org, here is for the time being how to add an entry to the launcher for netbeans or any other similar case (Eclipse IDE for example):
Netbeans executable is  : /home/user/netbeans-7.1.2/netbeans

go to folder : /home/user/netbeans-7.1.2/

and create a file named: netbeans.desktop

and append the following:


[Desktop Entry]
Encoding=UTF-8
Name=NetBeans IDE 7.1.2
Comment=The Smarter Way to Code
Exec=/bin/sh "/home/yourusername/netbeans-7.1.2/bin/netbeans"
Icon=/home/yourusername/netbeans-7.1.2/bin/Netbeans-Logo-box.png
Categories=Application;Development;Java;IDE
Version=1.0
Type=Application
Terminal=0

This assumes you have an icon in png format in the same folder.
Save and exit.
Then Drag the newly created file to the Launcher. You’re done.
Here are two PNG icons, one for Netbeans and one for Eclipse:

Eclipse

Eclipse Icon

Netbeans Icon

Netbeans Icon

————————-

You can even add embedded subentries:

Customized Eclipse Entry in Unity Launcher

Customized Eclipse Entry in Unity Launcher

[Desktop Entry]
Encoding=UTF-8
Name=Eclipse
Comment=Eclipse IDE
Exec=/home/hanynowsky/eclipse/eclipse
Icon=/home/hanynowsky/eclipse/eclipse.png
Categories=Application;Programming;Java;IDE;dev
Version=1.0
Type=Application
Terminal=0

X-Ayatana-Desktop-Shortcuts=Java EE;Java Swing;Android;

[Java Swing Shortcut Group]
Name=Java Swing
Exec=/home/hanynowsky/eclipse/eclipse -data /home/hanynowsky/Workspace/swing
TargetEnvironment=Unity

[Java EE Shortcut Group]
Name=Java EE
Exec=/home/hanynowsky/eclipse/eclipse -data /home/hanynwosky/Workspace/javaee
TargetEnvironment=Unity

[Android Shortcut Group]
Name=Android
Exec=/home/hanynowsky/eclipse/eclipse -data /home/hanynowsky/Workspace/android
TargetEnvironment=Unity
Advertisements

8 thoughts on “Add an Entry for Netbeans IDE in Ubuntu 12.04 Unity Launcher

  1. Pingback: Making a Unity launcher icon for the IDL Workbench | The IDL Data Point

  2. Pingback: Updating to Java 8 and NetBeans 8 on Ubuntu | Clarkonium

  3. Kevin Penrose

    Adds the netbeans icon to the unity launcher, but then when I click on it and netbeans starts, a new question mark icon appears in the launcher. Why doesn’t the netbeans icon just become the active netbeans ide icon?

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s