Shell Script to Validate JAVA Version

5:49 PM Posted by Preetish Panda

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 throw UnsupportedClassVersionError when class compiled with higher version of compiler gets executed.My utility gets called from shell script.So, I put a put check in the script to validate minimum JDK version of 1.6.Given below is the shell script and it was tested successfully in Korn shell.
Read more

Remove specific section from text file using java

9:04 PM Posted by Preetish Panda

In this post I'll share a code snippet that will remove specific section from the text file.Suppose your file has following structure:

Something
blah blah blah
START
lines...lines..
more..lines..
END
again some text

Our code will remove all the text present between and including START & END.

Read more

Anyconnect was not able to establish a connection

3:45 AM Posted by Preetish Panda

Cisco anyconnect on windows 7 will give this nasty error "Any connect was not able to establish a connection to the specified secure gateway".My password was authenticated.But, it threw same error soon after password authentication.Now, I didn't have a clue about what went wrong.After Googling out the error, found that hell lot of people face this issue.Let's ge
t into the point.First and foremost thing to do is to disable your internet sharing.If you are on windows 7, follow the steps given below.

Read more

Windows Phone 7: Gaining a Competitive Edge

8:38 PM Posted by Preetish Panda

The giant returns to power! This time Microsoft comes to limit all the competitors’ ambitions by the innovative OS for mobiles. Windows Phone 7 is known as the new mobile platform released by Microsoft and related to Windows Mobile operating systems. It is based on the Windows CE 6 kernel and integrated with Xbox Live, Zune, and Bing services.
Read more

Link Cloaking in WordPress Blogs

12:33 PM Posted by Preetish Panda


It has become a common practice to promote products and services through affiliate marketing. WordPress being most customizable CMS/blogging software; Internet Marketers, bloggers use it.Marketer puts a referral link and visitors click on it. Website owner gets some percentage when target is successfully converted. Now chew on this fact "People just don't get over fact that IMers or bloggers make many money when they click on a link".Anyway the solution is to cloak links and then forward them to target website.

Read more

Playing MP3 Audio using JAVA

3:25 AM Posted by Preetish Panda

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 libraries already available with JDK.For MP3 files there is use of an external API called JLayer(Javazoom project). Ok .. let's get started.

Read more

Store Multiple Values for a Key using Apache Collections

12:20 AM Posted by Preetish Panda

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 this we can use a hashmap to store a key and value will be a list.But,Here we'll discuss about Collections API given by Apache to do the trick.

Read more