Java

Fixing Areca Backup on Ubuntu 16.04 (and related distributions)

Seems like I’m at it again, this time fixing Areca Backup on Ubuntu 16.04 (actually Linux Mint 18.1 in my case). For some reason when I download the current version (Areca 7.5 for Linux/GTK) and try and run the areca.sh script I get the following error: tyler@computer $ ./areca.sh ls: cannot access ‘/usr/java’: No such file or directory No valid JRE found in /usr/java. This is especially odd because I quite clearly do have Java installed:

RandomSort

Back in University some friends and I had joked about creating a “random” sortation algorithm that could be used in place of other fast, efficient and, well, better solutions like Quick Sort or the like. While cleaning up some files on my computer today I came across this monstrosity and decided what better place to put it than up on my GitHub page. So there you have it, now you too can have a sorting algorithm that may never actually succeed in sorting anything at all!

Hash Verifier now on GitHub

I have taken the time to create a GitHub repository for my old Hash Verifier software which you can now find here. I’ve even created different releases to reflect the evolution of the software as found on this website. Hopefully this will make it even easier for you to check out and play around with. GitHub repository link: https://github.com/tylerburton/hashverifier Version 0.1.0.0 (Original post) Version 0.2.0.0 (Original post) Version 0.3.0.0 (Original post)

Neat way to move a file in Java without nio

Saw this somewhere and figured I would post it before I lost it. Here is a very easy and simply way to move a file in Java without using the new-ish nio APIs. File srcFile = new File(…some file to move…); File destFile = new File(…where to move the file…); srcFile.renameTo(destFile); That’s it. Pretty simple. In fact it is actually shorter than the nio way of doing things FileChannel in = new FileInputStream(source).

Fixing Areca Backup on 64-bit Windows

If you’re like me, and you probably are, you do a terrible job of backing up your digital files life on a regular basis. Thankfully some smart people out there have made it awfully convenient to set up a backup system once and then more or less forget about it. My personal tool for the job is Areca Backup – while it is not without its flaws I find it an easy to use, feature rich, and cross-platform (essentially anything that runs Java) backup solution.

A quick and dirty way to convert Java objects to and from XML

The process to marshal or serialize an object to XML can differ greatly from language to language and implementation to implementation. Even within a single language, like Java, there are multiple ways to go about it. I happened to stumble upon this one the other day and thought it was pretty straight forward. This example contains two classes XMLExample.java and Example.java. We will use the functions in XMLExample.java to convert Example.

The Linux Experiment Post Roundup

There has been quite a bit of activity on The Linux Experiment over the past little while. Check out the site here or quickly jump to the post that I wrote below. Big distributions, little RAM 3 How do the ‘big time’ distributions handle on constrained hardware? Take a look. How to install sun-java6-jdk and Netbeans in Ubuntu 11.10 A simple process to install the official SunOracle Java JDK and Netbeans IDE in the latest Ubuntu.

Android development in Netbeans

So you want to do Android development but you hate Eclipse? Well fear not, there is another IDE that you can use to meet your mobile development needs. This is a quick guide, mostly for my reference later, on how to setup an Android development environment in Netbeans. 1. Download and install the Android SDK and Netbeans IDE like normal Pretty self-explanatory just grab the installers from here and here respectively.

Dynamically load a jar at runtime

A short post but I figured I would throw it up here before I lose my code. There are a couple of different ways that you can load jar’d code at runtime but here is a simple solution that I found to work very easily. File myJar = new File("myJar.jar"); URL url = myJar.toURI().toURL(); Class<?>[] parameters = new Class[]{URL.class}; URLClassLoader sysLoader = (URLClassLoader)ClassLoader.getSystemClassLoader(); Class sysClass = URLClassLoader.class; try { Method method = sysClass.
Create a GStreamer powered Java media player

Create a GStreamer powered Java media player

For something to do I decided to see if I could create a very simple Java media player. After doing some research, and finding out that the Java Media Framework was no longer in development, I decided to settle on GStreamer to power my media player. GStreamer for the uninitiated is a very powerful multimedia framework that offers both low-level pipeline building as well as high-level playback abstraction. What’s nice about GStreamer, besides being completely open source, is that it presents a unified API no matter what type of file it is playing.