Dynamic in-memory compilation

Let’s suppose you have some string containing a source code for a class, something like “public class Test {}”. You want to compile it dynamically in memory and get an instance of that class. How can you accomplish that? We will try to present here a way to do it. We will use the javax.tools [...]

Are your Strings splitting right?

On a scale from 1 to 10 the issue I talk today about is about 2… unless it will bite your behind and make you randomly scream WTF’s for two hours:) So today’s motto is: beware of small things! At first take a look at the following code snippet:

public class LineParser {
[...]

What are writeObject and readObject? Customizing the serialization process

Using Serialization in Java is pretty simple. If you have some object you would like to serialize, you just make it implement the Serializable interface. Then, you can use the ObjectOutputStream to store that object to a file or send it to some other machine. All non-transient and non-static fields will be serialized and even [...]