Notes on Ubuntu (Linux) computing

Brief notes on installation, setup and other tasks in the Ubuntu world

Archive for the ‘Java’ Category

Install vim-template vim plugin

leave a comment »

The vim-template plugin allows for the use of templates for different file types: *.html, *.py and so on. Following the installation instructions (see above link), we use pathogen to install the plugin:

cd ~/.vim/bundle
git clone git://

Use of plugin

Now, you can make use of the templates when starting vim. For example, a python template is loaded by recognition of the *.py filename:


Or, if you have new buffer, type the following for the template to be loaded inside vim:

:Template py

The available templates can be seen here. Using the pathogen installation described above, these templates are located (on your machine) at ~/.vim/bundle/vim-template/templates/.


If you want to customize certain fields, like email and username, you can add the following to your .vimrc file:

" Customize the settings for vim-template plugin                                
let g:email = ""
let g:user = "Desired Name"                                         
let g:license = "Desired License"

If you want to customize the templates, there is a search order for templates (see here) allowing you to write your own template-files and store them in the local directory.


Written by Chris S

November 7, 2013 at 7:28 pm

Posted in computing, Java, LaTeX, Python, R

Tagged with , , , ,

Install JabRef

leave a comment »

JabRef is a Java-based reference manager with an emphasis on LaTeX. Installation involves downloading the *.jar file (find a link to the most current version here).

Change permission on file to allow execution (of course, use your version of JabRef jar):

chmod u+x JabRef-2.8.1.jar

Starting JabRef from the command line is done with:

java -jar JabRef-2.8.1.jar

In practice, it is probably best to create a launcher for the application.

Written by Chris S

October 12, 2012 at 10:45 pm

Install Java

leave a comment »

I have always found that the Sun, now Oracle, version of Java is needed for some of the Java programs that I use in Ubuntu. For 12.04 LTS, there is a ppa to install Oracle Java 7 JDK, described here. First, Oracle requires the acceptance of their license:

echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections

Note: I had to modify the above command, resulting in the above form, for this to work (see ‘update’ section in above link for original).

Next, install from the ppa:

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

A test of the Java version:

java -version

should return something like:

java version "1.7.0_07"
Java(TM) SE Runtime Environment (build 1.7.0_07-b10)
Java HotSpot(TM) 64-Bit Server VM (build 23.3-b01, mixed mode)

Finally, you can check the plugin for Firefox by typing about:plugins in the address bar — you should see many Java-related enteries.

Written by Chris S

October 12, 2012 at 8:17 pm

Posted in Java, Ubuntu 12.04

Tagged with , ,