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 (“–“):
nouveau.blacklist=1

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.

Conclusion

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.
Android

Setup Android Honeycomb Development on Ubuntu in Eclipse

Here are the steps that you will want to take to start Android Honeycomb development on Ubuntu (or even Windows for that matter). This guide assumes that you have an internet connection and Eclipse: Helios installed:

  1. Goto the Android Developer pages and Download the SDK.
  2. Install the SDK and place it in a location in your filesystem. (Remember this location because later, it is required to setup the Eclipse ADT plugin)
  3. Run the SDK manager and install all of the avaliable Android packages; this may take some time depending on your internet connection speed.
  4. Fire up Eclipse Helios and goto: Help -> Install New Software…
  5. In this section you will want to add two new repos to Eclipse and they can be found on this google code page and the ADT repo from the Android developer pages. Instructions are provided in the links.
  6. The second repo that you installed contains the ADT plugin; select that repo from the list and install the ADT plugin. Once you are done you will be prompted to restart eclipse which you should do.
  7. Once Eclipse has restarted you will want to let the ADT plugin know where you installed the SDK. To do this go: Windows -> Preferences and then Click on the ‘Android’ preference tab; a window should appear that asks you for the ‘SDK Location’. Put the filesystem location of the Android SDK in that box and hit apply. If many targets appear after a few seconds then you have done it correctly. Now press OK to exit the Preferences.
  8. Go back and run SDK manager again. In here create an Android virtual machine for the type of Android Project that you would like to develop. Remember that the more RAM that you give the VM the better but the emulator will probably still be slow; try and mirror a real device.
  9. In Eclipse, press Ctrl+N and create an Andriod project from the menu. First select the version of the SDK that you would like to use and then I recommended selecting one of the test projects that are avaliable for that SDK.
  10. Run the project from the eclipse run menu as an Android Project and watch it run in an emulator.

And that is all that there is to it. Perhaps a few more steps than you would expect but once you are done you will have a complete Android Honeycomb development environment. If you have any questions or want clarification then please ask it in the comments.

Fuppes, Packaging, Weekly Summary

Packaging Gets Complicated (Weekly Summary Three)

Happy Valentines Day readers. I’ve had quite a little trip over the past few days. I have done alot this week in my attempt to package Fuppes for Debian and it makes for a long sort of story; so long, that you should consider this the weekly summary. I had finally taken Fuppes to the stage where I believe that it was ready to package; it compiled just fine on Ubuntu and, believing that Debian and Ubuntu were not that different, I wanted to make and submit a package for Debian. But first that would require a Debian install on my machine.

Dual Booting Ubuntu and Debain

The logical option was to dual boot Debian and Ubuntu and make them share the same /home partition. For those of you who have not heard of this before, many GNU/Linux users that I know prefer to always partition their machines so that one partition is for the root directory and one for the home directory. This has important advantages for data retention:

  • Your OS is separated from your personal data
    The operating system exists in the root directory and all of you data (should) exist in the /home directory; therefore, if you wanted to, you could completely reinstall your OS and keep all of your data. This has saved me quite a few times when I have damaged my OS beyond repair and done a complete reinstall; a few moments after the reinstall I’m exactly where I left off. No loss of data at all.
  • Better for Hard Drive Fails
    I have been led to believe that partitioned hard drives are easier to extract data from in the case of faults. Should you be crazy enough not to make backups, then you may have a greater chance of success of recovering your drive with this setup.

What this all means is that when I wanted to dual boot two operating systems that point to the same data all I had to do was add an extra partition for the Debian OS and tell it to mount the /home directory as its own. Therefore I have the following partitions on my machine:

  • /dev/sda6 – Ubuntu /
  • /dev/sda7 – /home
  • /dev/sda8 – Debian /
  • swap – Common swap directory

However, getting there was not that easy, and I encountered two problems when trying to install Debian lenny via a net install I met with two problems. The first was one that I could not explain; when I tried to install Gnome as my window manager it would download all of the required packages and then freeze for no apparent reason. I had no idea why that happened and I still don’t but I can tell you that using Xfce as my window manager instead solved the problem.

The next issue that I encountered was more serious, my Debian net install CD had no knowledge of the existence of /ext4 file systems; which was the type of file system that I had installed the Ubuntu root on. So when the Debian install went looking for other OS installs it could find nothing. It said that it found nothing else on the machine and asked me if I would like to overwrite the MBR. I didn’t really think straight and clicked OK; byebye Ubuntu Boot record. So Debian installed correctly but now my Ubuntu partition was unreachable; good one Robert, I felt pretty dumb. But, luckily, it was fairly easy to just reinstall Ubuntu on that partition again. Ubuntu recognized the /ext3 partition that Debian was installed on and now I have a Dual Boot-able system with Debian and Ubuntu. Finally I could try and compile Fuppes on Debian.

Compiling Fuppes on Debian

When I tried to compile fuppes on Debian it proved to be more difficult than I thought. It seems that the real difference between Debian and Ubuntu is the strictness of which packages you can install and what they provide. Debian is very strict about the whole FOSS concept and does not let you use anything that is not. As a result many of the meta-packages for fuppes did not build. My short term solution was to simply comment them out and try and get what remained into Debian. Once it was in Debian then it would be my future task to add support for all of the extras. As a result I am pleased to announce the following:

FUPPES has finally gone up for Debian RFS (Request For Sponsor)!

The package itself has been placed on mentors.debian.net for sponsors to download it and check it out. As of the time of this writing three prospective sponsors have checked it out downloaded it. I hope to hear from them soon with any comments that they may have. I expect that there will be a number of things that I got wrong, being my first package, but I will put in whatever effort is required to actually get this package in there.

Other Notes of Interest

  • It turns out that it is not that hard to make a package archive mirror for Ubuntu; I’ll be making one later this week.
  • The Ubuntu Vimperator package is broken in Ubuntu but not Debian. So for a dual booter like me I cannot currently have Vimperator in both Ubuntu  an Debain. This should be fixed in Ubuntu Lucid.
  • Bioshock 2 is an awesome game! I finished it in four days. The storyline was a major disappointment but the gameplay was beyond compare. All in all good work 2K.
  • Telstra Bigpond frustrates me. I am only allowed 12GB per month and there are no other competitors that I can goto to get a better deal; somehow they have monopolised my area and I am stuck with their ripoff prices.
  • The next game I might look at playing is Trine; suggested to me by a friend.

I hope you’ve had a great week. Thanks for reading this long post and I will keep everyone updated.

Interesting

Kindle for PC (And probably for Linux too)

Through the tangle of links that make up my daily browsing routine I came accross this gem from howtogeek which describes the windows beta for ‘Kindle for PC’. I had not heard about it before but I am very excited; when I first heard about the Amazon kindle i really wanted to get one. A cool little device that would allow me to read many and varied books? That seems like a winner to me. But alas, the price of the device drove me away, it was just to expensive to be worth considering as I would have to buy a large number of books via kindle for it to have been worth it. But now with the ‘Kindle for PC’ look at the benefits:

  • The device is completely FREE
    The ‘device’ as I called it, is just a piece of software that they will be giving away for free. You’ll essentially turn your computer into a kindle and I know that in my case it certainly has a bigger screen (though reduced battery life compared to a kindle). This also means that when you buy a book for the ‘kindle reduced’ price you immediately get the cost benefits.
  • You can have upto six kindle devices at any one time
    This means that if you want to share your books with a partner or your family then you merely have to all use the same account. So just setup a family kindle account and you can all benefit from each others purchases, each on your own PC. No more do you have to buy one book that everybody wants to read (like Harry Potter or Eragon in my families case) and read it one at a time; you can all read it at once with no more cost than that of buying one book.
  • You retain all of the other Kindle Benefits
    You have portability, guaranteed ownership of books and every other positive of owning the original Kindle.

With all these benefits I was spell-wrapped, here is a piece of software that I could now feel free using for all my book purchases; but will a version be made for linux? That was my one worry. I checked with the Kindle webpage and it said that there would be a version for Windows and that a Mac version was coming soon: but nothing about linux. I could try and get the Windows version and run it under wine but I would always be doing a little bit of fighting to get it to work correctly. So I just asked them directly if they were going to produce a version for linux and this is there response:

Hello,

Thanks for writing about Kindle for PC for Linux.

Kindle for PC is compatible with PCs running Windows XP, Windows Vista, or Windows 7.

We’re working on a Kindle for PC for operating systems like Linux, Mac which is expected to be available soon.

Strong customer feedback like yours helps us continue to improve the service we provide, and we’re glad you took time to write to us. I’ll send your comments to the Kindle team.

Well that’s a start (please note that that is only the head of the message; the rest looked auto-generated). They are working on a version for linux. If that is true then we may have something to hope for; if they have started work on it then all we have to do is show interest and we can hopefully see a version for Linux in the future. I for one know that I am really looking forward to it; I promise that should a version of the ‘Kindle for PC’ come out on Linux then every time I goto buy a book I will choose the Linux ‘Kindle for PC’ version first; that’s how much I love this idea.