Java Tree implementation

In this tutorial I am going to show a simple Tree data structure implemented in Java.We will see how to create Tree data structure and also a mechanism of traversing the tree in a very easy way. The Tree which we will create in this tutorial will be the java representation of the image shown … [Read more…]

Like this post? Don’t forget to share it!

Sort List in Java using Collections.sort(List)

sort collection

In this tutorial, I will describe sorting list in java using Collections.sort(List). Here are some nice animations for sorting. I will be showing examples for 1. Sorting objects that implement Comparable 2. Sorting objects that don’t implement Comparable Sorting objects that implement Comparable We can sort  java.util.List using a java utility class java.util.Collections. We will … [Read more…]

Like this post? Don’t forget to share it!

Run any command via Java, You can even shutdown your computer

Recently I cam across a tutorial site that allowed to copy your code in a textarea and then allowed to execute the java program. Although the intent of the site was good but anyone with bad intentions could disrupt this site easily and execute any command. Here is a program that you can run to … [Read more…]

Like this post? Don’t forget to share it!

java.lang.NoClassDefFoundError: org/springframework/orm/jpa/EntityManagerFactoryUtils on shutdown

Recently we faced an issue which occurred on the Ubuntu 14.02. The issue was that undeploy was not working properly. It had exceptions on undeploy about threads not being shutdown. If we tried to shutdown the tomcat afterwards, it just didn’t want to die. The tomcat process was still running even after calling the shutdown.sh … [Read more…]

Like this post? Don’t forget to share it!