Tag Archives: Java

Compiling Java Packages and Subpackages from the Command Line

The packaging system in Java can be tricky for the beginner to navigate. Follow the steps below to create, compile, and run a test program that creates a Java program whose classes belong to a root package and a subpackage. … Continue reading

Posted in Uncategorized | Tagged , , | Leave a comment

Building a Java Program with Gradle

Follow the steps below to create and run a Java application in Gradle. These instructions assume a computer running Microsoft Windows. 1. If you have not already done so, download Java and a Java Development Kit. 2. In any convenient … Continue reading

Posted in Uncategorized | Tagged , , | Leave a comment

Building a Java Program with Apache Maven

Follow the steps below to create, package, and run a simple Java application using Maven, a free automated build tool for Java maintained by the Apache Software Foundation. These instructions assume the computer is running a Microsoft Windows operating system. … Continue reading

Posted in Uncategorized | Tagged , , | Leave a comment

Uncompressing Data with the Deflate Algorithm in Java

The code shown below is an implementation of the Deflate algorithm written by Nayuki Minase, and slightly simplified by myself. As of this writing, the original version can be obtained at the URL http://nayuki.eigenstate.org/page/simple-deflate-implementation. Specifically, I simplified it by squeezing … Continue reading

Posted in Uncategorized | Tagged , , , | Leave a comment

Programming a Simple Music Synthesizer in Java

The code given below uses the WavFile class from a previous post to build a text-to-music synthesizer. import java.io.*; import java.util.*; public class MusicSynthesisTest { public static void main(String[] args) { parseAndSynthesizeSong(); } private static void parseAndSynthesizeSong() { Music.Song songToSynthesize … Continue reading

Posted in Uncategorized | Tagged , , , , | Leave a comment

Hello World in Android Using Eclipse

This tutorial is a simplified, or at least condensed, version of the equivalent tutorial pages on developer.android.com, which are mostly fine, but they aren’t quite brainless enough to suit me. Plus, for the latest version of Android there was a … Continue reading

Posted in Uncategorized | Tagged , , , , | 2 Comments

Sending an Email with an Attachment Using JavaMail

1. Follow the steps in the previous post titled “Sending an Email from Java Using JavaMail and Apache James”, but replace the contents of the EmailTest.java file with the text below. The updated code attaches a copy of the source … Continue reading

Posted in Uncategorized | Tagged , , | Leave a comment

Sending an Email from Java Using JavaMail and Apache James

Email! Get connected! The phrase “Email! Get connected!” is a registered trademark of This Could Be Better LLC, which is a company that doesn’t exist, and also it’s not a registered trademark because no one ever, um, registered it. All … Continue reading

Posted in Uncategorized | Tagged , , | 2 Comments

Compressing and Uncompressing Data in Java Using Zlib

The Zlib data compression library is built into Java, and allows you to compress and decompress data. So, uh… ’nuff said? 1. If you have not already done so, download and install the Java Development Kit. Details are given in … Continue reading

Posted in Uncategorized | Tagged , , , | 6 Comments

Reading and Writing a BMP File Using Java

The Windows BMP file is a fairly simple file format, and doesn’t (necessarily) involve any compression, which makes it one of the easiest image file formats to actually, you know, understand. UPDATE 2012-12-14: Since this post has, much to my … Continue reading

Posted in Uncategorized | Tagged , , , | 2 Comments