Atlassian, Linux

Fixing a Play Framework Java Compiler Version Warning

So I was doing some play development when compiling my code gave me the following warnings:

[warn] there were 1 feature warning(s); re-run with -feature for details
[warn] one warning found
[warn] warning: /home/robert/installed/play-2.2.1/framework/../repository/cache/com.atlassian.connect/ac-play-java_2.10/jars/ac-play-java_2.10-0.6.4.jar(com/atlassian/connect/play/java/controllers/AcController.class): major version 51 is newer than 50, the highest major version supported by this compiler.
[warn] It is recommended that the compiler be upgraded.
[warn] warning: /home/robert/installed/play-2.2.1/framework/../repository/cache/com.atlassian.connect/ac-play-java_2.10/jars/ac-play-java_2.10-0.6.4.jar(com/atlassian/connect/play/java/AC.class): major version 51 is newer than 50, the highest major version supported by this compiler.
[warn] It is recommended that the compiler be upgraded.
[warn] warning: /home/robert/installed/play-2.2.1/framework/../repository/cache/com.atlassian.connect/ac-play-java_2.10/jars/ac-play-java_2.10-0.6.4.jar(com/atlassian/connect/play/java/AcHost.class): major version 51 is newer than 50, the highest major version supported by this compiler.
[warn] It is recommended that the compiler be upgraded.
[warn] warning: /home/robert/installed/play-2.2.1/framework/../repository/cache/com.atlassian.connect/ac-play-java_2.10/jars/ac-play-java_2.10-0.6.4.jar(com/atlassian/connect/play/java/CheckValidOAuthRequest.class): major version 51 is newer than 50, the highest major version supported by this compiler.
[warn] It is recommended that the compiler be upgraded.
[warn] warning: /home/robert/installed/play-2.2.1/framework/../repository/cache/com.atlassian.connect/ac-play-java_2.10/jars/ac-play-java_2.10-0.6.4.jar(com/atlassian/connect/play/java/token/CheckValidToken.class): major version 51 is newer than 50, the highest major version supported by this compiler.
[warn] It is recommended that the compiler be upgraded.
[warn] 5 warnings

In this particular case you should notice that it says “major version 51 is newer than 50”. This means that we are using a Java 6 Compiler when we should be using a Java 7 compiler and you can confirm this by:

$ javac -version                       
javac 1.6.0_27

As you can see it is, in-fact, the Java 6 compiler (1.6 means Java version 6). So what do we do to fix this problem? Simple, you just make it so that a Java 7 version of javac is higher in your PATH environment variable than the one that is currently being used. You’ll know when you have it working and setup correctly when you see something like this:

$ javac -version
javac 1.7.0_40

For more information on how to change your path variable see this StackOverflow post.

Linux, Troubleshooting

Installing Ubuntu Linux on the MSI GT780DX

Very recently I bought the MSI GT780DX Laptop from PC Case Gear as I was very impressed by its specs. Out of the box it was a beautiful machine and came with windows pre-installed. Pretty stock standard really but I wanted to dual boot linux on it; more specifically Ubuntu Linux. For those of you who do not know what Ubuntu Linux is I suggest that you take a look because it is a complete replacement for Windows and it is completely free (and I don’t mean “free but there is…”. No. I mean free and with no catches.) Please, just click the Ubuntu Linux post above if you have not done so and have a read; at the very least you will not understand why I am doing what I am doing until you do.

For this installation I used a Live USB which contained Ubuntu 10.4 which I immediately upgraded after the install.

This post does not focus on getting a full install working. It just focuses on the extras that I had to go through in the install process to make sure that it worked correctly. So these are the issues that I came across, in order, in the install process:

  • Backup Windows Completely first. All I will say is that when you boot into windows for the first time there will be a nifty tool there to make a complete snapshot of the entire OS. Use it and move it to another drive. (I will not talk about this point further; it should just be something you do naturally anyway.)
  • If you have a DXR as opposed to a DX (like me) then, according to various forums, you need to get rid of the RAID0 setup before you can install Ubuntu. (I will not talk about this point further; you will need to find this information elsewhere. It is out there. And if you bought a computer with RAID0 on it then you are supposed to know what you are doing anyway.)
  • When you put in the boot CD/USB you cannot just hit “Install” straight away; first you must blacklist the nouveau kernel module.
  • Choose an appropriate partition size for Windows; I gave Windows 400GB. (I will not talk about this further; go here to learn more about dual booting Windows and Ubuntu)
  • Whenever I have mouse issues I use the special: sudo modprobe -r psmouse && sudo modprome psmouse

Blacklisting the Nouveau Driver

NVidia’s drivers are not open source; Nouveau is an open source project that attempts to rectify that. However, their support for newer graphics cards is somewhat flaky, especially in older installation USB’s. Therefore you will need to disable the Nouveau drivers before you continue with the install. The instructions are summed up well in this quote so start the Live USB and then when you get to the “Install Options Screen” just read this:
Righty-o, confirmed here. Something’s amiss with the nouveau module. Blacklisting it will let you boot, using fallback framebuffer instead. When booting, hit TAB to edit the boot parameters. Add this to the end of the line, but before the two dashes (“–“):

Then boot. You may see the screen go messy while you write because the line gets two wide to fit, but don’t worry, all is good. You may see a message complaining that nouveau does not have an option, “blacklist” or something like that, but it does, and it does work, and I think maybe that message should’ve read, “there’s no nouveau module to do ‘blacklist’ on” as the module isn’t loaded, and that’s probably what the complaint it about. It’s also what we want to happen 😉

And that is all that there is to it. Once you have blacklisted the driver you should be able to install the rest of Ubuntu with no issues. When you finally have a working install make sure that you install nvidia-current by opening a terminal and:
sudo apt-get install nvidia-current
You will need the latest drivers to get your computer to work at its maximum potential.

Mouse Problems

Sometimes the mouse on this Laptop stops working; even if you press and re-press the disable mouse button. To get it to work again just restart the mouse kernel module:
sudo modprobe -r psmouse && sudo modprobe psmouse
After that you should notice your mouse become active again.


Ubuntu is an awesome operating system and it is pretty easy to install on this MSI Laptop. If you have any questions on what I did to get Ubuntu to dual boot with windows then please add it to the comments.
Linux, Troubleshooting

Installing keepass2 on Ubuntu Linux 11.10 to work in Google Chrome via KeepassHTTP

Keepass2 is a Password Manager for Linux (and other operating systems) that is awesome and can be made to autofill your passwords in your browser and still keep them all safe. All this functionality at your fingertips and you only need to remember one simple (and single) password. If you really want to see the full list of features for keepass then you can take a look at their list of features.

Keep in mind that this tutorial is performed on the following version of Ubuntu:

% cat /etc/lsb-release

We also are trying to install the following software:

What should installation be like?

Being an Ubuntu user you would think that you could just open up a terminal and type in something like this to install keypass2 and keepasshttp:

 sudo apt-get install keepass2
 sudo mv KeePassHttp.plgx /usr/lib/keepass2

But unfortunately that does not work. The plugin even fails to load.

How to actually install it

Installing keepass2 is actually markedly more complicated then that. This is the full set of instructions that you have to perform:

 sudo apt-add-repository ppa:jtaylor/keepass
 sudo apt-get update
 sudo apt-get install keepass2 mono-complete
 git clone /tmp/keepasshttp
 cd /tmp/keepasshttp/KeePassHttp
 sudo cp KeePassHttp.dll Newtonsoft.Json.dll /usr/lib/keepass2

And now it works exactly like it should. The important extras required to get it to work are, in order:

  • The addition of the jtaylor/keepass Personal Package Archive (PPA).
  • The extra installation of the mono-complete package.
  • The checkout of the git repository to get the KeePassHttp.dll and Newtonsoft.Json.dll library files instead of just using the plgx package file.
We will explain the requirements of those three extra steps in the following section if you really care. But at this point in time you should have keepass2 installed.

Why it is not currently like it should be?

Lets answer each of the three extra steps in a one by one fashion.

Why did we need to install the jtaylor/keepass PPA instead of the one provided and packaged by ubuntu?

Essentially the version of keepass2 was too low to be compatible with all of the latest bug fixes in keepasshttp. As you can see Ubuntu will be getting keepass version 2.18 in Precise Pangolin but in Oneric they only have version 2.16. But if you look here the latest version of keepasshttp requires version 2.17 of keepass as a minimum. That is why we installed a newer version of keepass from a PPA. This means that when you upgrade to Pangolin you can remove this PPA from your Software Sources.

Why did we need to install the mono-complete package?

If you do not install the mono-complete package and attempt to sync Google Chrome with keepass2 through ChromeIPass and keepasshttp then the Newtonsoft.Json.dll will crash with a nasty looking stacktrace. The way to solve this is to get all of the mono libraries.

Why did we need to put the .dll files in the keepass2 directory instead of the .plgx file for keepasshttp to start working?

Because putting the plgx file in the directory did not work for me and putting the .dll files in did. And you can take a look at what this guys says here for more information.