Blog
Parse Date in Java using a list of formats.
23 Sep, 13

Parse Date in Java using a list of formats.

In extension to the parse-date-in-grails-2-x-x-regardless-format We’ll parse date from a list of available formats to java.util.Date using apache’s commons lang library. This can be used in the service layer like: [php]String[] datesFormats = new...
Play MP3 files in Java using JLayer
23 Sep, 13

Play MP3 files in Java using JLayer

Recently, I was trying some media API and found the JDK 1.6 doesn’t play MP3 files out of the box. So, I searched a little and found JLayer that can play mp3 format, you only have to include its jar file. Other than JLayer there’s Java Media Framework...
Create Java project with Maven from terminal.
23 Sep, 13

Create Java project with Maven from terminal.

Install maven on your system and run the following command: mvn archetype:generate -DgroupId=com.jft.prashant -DartifactId=MavenSample -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false This will generate the required directory structure with...