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 script I get the following error: tyler@computer $ ./ 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:

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 and We will use the functions in to convert Example.

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.

Hash Verifier (Java Web Start)

Java Web Start is a technology that allows easy deployment of Java based software through a web browser. The advantages of this framework are numerous but one nice thing is that it allows you far more freedom then the completely sandboxed Java applet. In this post I will detail how I converted my Hash Verifier application to run right from the browser. Java Network Launching Protocol (JNLP) The javax.jnlp libraries provide the functionality needed to launch the application from within a web browser.

Updates to Java & Mono

Both Java and Mono (the open source implementation of C# and .NET) will be receiving pretty big updates this year. These represent two very popular virtual machine based coding platforms that offer portability and a slew of helpful standard libraries. Here are just a handful of the improvements each will see in the coming release. Java SE 7.0 While no tentative release date has been scheduled for Java 7 yet, the team has recently completed milestone 10 of 10.

Introduction to SWT programming

Back in this previous post I mentioned the possibility of putting up a sort of how-to guide on SWT programming. Well I’ve finally found some time to do so. I will try to make this as step-by-step as possible so that anyone reading this will completely understand what I’m doing. What you’ll need I’m making the following assumptions before starting: That you’ve already installed the Java Development Kit (not just the Java Runtime) That you’ve installed Eclipse.