Tagged: java

Shell Script to Validate JAVA Version 0

Shell Script to Validate JAVA Version

In this post we’ll go through a shell script to validate JAVA version. In my recent project, I had to check for JVM version greater than or equal to 1.6.Lower version of JVM would...

Remove specific section from text file using java 0

Remove specific section from text file using java

In this post I’ll share a code snippet that will remove specific section from the text file.Suppose your file has following structure: Somethingblah blah blah STARTlines…lines..more..lines.. END again some text Our code will remove...

Playing MP3 Audio using JAVA 0

Playing MP3 Audio using JAVA

In this post we’ll discuss about playing music files using java . cool huh ? Well, this post contains three ways to play music files.To play files with au or wav extensions we’ll use...

Store Multiple Values for a Key using Apache Collections 0

Store Multiple Values for a Key using Apache Collections

In common programming we use maps to store key and value pair. They have one-to-one relationship.But, sometimes we need to use one-to-many relationship in order to store multiple values for a particular key.To achieve...

Adding File Chooser using NetBeans 1

Adding File Chooser using NetBeans

File chooser is one of the most prominent and widely used feature, used in in any kind of application.This feature can be added to JAVA based application using NeatBeans IDE with few steps and...

Switching off Log4j logging using JAVA 0

Switching off Log4j logging using JAVA

Sometimes we need to switch off logging done by Log4j API. In most of the cases console logging is given by default for external APIs using Log4j.We can turn it off through simple Java...

SFTP without host key verification using J2SSH 0

SFTP without host key verification using J2SSH

In this post we will see how to make SFTP connection using J2SSH library and by pass host key verification.When client connects to server using SFTP, server provides public key to the client for...

Packaging dependent libraries in Jar file 1

Packaging dependent libraries in Jar file

Sometimes developers release Java based applications as distributable Java Archive or JAR files.Most of the time, my applications are JAR files only.The major concern lies with dependent external library files.The final released JAR file...

How to persist OAuth access token for twitter application 0

How to persist OAuth access token for twitter application

Twitter has become become the information hub in the world wide web.Popularity of Twitter is because of its simple user interface with abounding features and galore of APIs.Any developer will agree, Twitter has most...

Access and Manipulate Elements of XML file Using Jdom 2

Access and Manipulate Elements of XML file Using Jdom

It has been long time since I updated my blog, challenging the very definition of blog.Anyway lately I’ve been doing some XML parsing for a new project using Java.I used the default “document Object...