running java code on different JDK and different results appear
===

In my java code I use a LinkedHashMap to store data and at the end I remove duplicates and sort parts of data and the result is fine, what I need. Using JDK 1.6 
However, running the same code on a different Linux server with JDK 1.5 gives a different result. For instance it doesnt sort the elements of LinkedHashMap for me or maybe the Collections dont work. 
I would really appreciate your advice. 
 