Category Archives: Environment Setup

Getting set up.

Javadoc: Setting the @author Name in Eclipse

If Eclipse isn’t generating Javadocs that have the @author name you want displayed, this should help.

Mac OS

  1. Navigate to the Applications > eclipse folder.
  2. Right click on the eclipse application launcher and choose the Show Package Contents option.
  3. Navigate to the Contents > Eclipse folder and open the eclipse.ini file in the editor of your choice.
  4. In the eclipse.ini file, find -vmargs and add the line -Duser.name=atebitbyte underneath it, where atebitbyte is the name you want displayed (e.g., @author atebitbyte) when you generate Javadoc comments.
  5. Save the file, reopen Eclipse, and any future comments should have the new author name.

Modifying Comment Templates

Another way to modify the comment templates is to open the Eclipse > Preferences… menu and go to Java > Code Style > Code Templates. You can write and export your own custom templates, or import a template you made previously.

Installing Eclipse Luna on Ubuntu

I wrote this a few years ago and am mainly posting it for testing and my own reference. I’ll probably update it eventually.


Download and extract eclipse. It should be in your downloads folder with the name eclipse-cpp-luna-SR1a-linux-gtk-x86_64.tar.gz

Steps and Notes: Terminal Commands:
Update Repositories sudo apt-get update
Install Java sudo apt-get install openjdk-7-jdk
Change to user directory cd ~
Move eclipse package to /opt directory sudo mv Downloads/eclipse-cpp-luna-SR1a-linux-gtk-x86_64.tar.gz /opt/
Change to /opt directory cd /opt
Unzip the eclipse package sudo tar -xvf eclipse-cpp-luna-SR1a-linux-gtk-x86_64.tar.gz
Create a desktop entry: cd ~/../../usr/share/applications
Create a file called eclipse.desktop in the applications directory. sudo touch eclipse.desktop

Edit the file; if vim is not already installed, you may need to type:
sudo apt-get-install vim to install it.

sudo vim eclipse.desktop
Type i, which is the insert key and will allow you to begin typing into your file. i
 File Contents:

[Desktop Entry]

Name=Eclipse
Type=Application
Exec=/opt/eclipse/eclipse
Terminal=false
Icon=/opt/eclipse/icon.xpm
Comment=Integrated Development Environment
NoDisplay=false
Categories=Development;IDE;
Name[en]=eclipse

Hit the escape key, then w (write), then (quit), and hit enter/return.

esc+wq+enter

Install the desktop file.

Failure to include the [Desktop Entry] group header at the top of the eclipse.desktop file will cause this command to give the error message: Error on file “eclipse.desktop”: Key file does not start with a group 

sudo desktop-file-install eclipse.desktop

Eclipse is now installed.

 

More on desktop entries.

More on desktop-file-install.