Java
Find the Calling Class
Posted March 28th, 2008 by administrator
Here is a simple snippet to find out the calling Java Class.
Class.forName(new Throwable().getStackTrace()[2].getClassName()));
Recursively Convert Gif Images To Jpg
Posted December 26th, 2007 by administrator
Converting images from gif to jpg for web or other reason can be done easily using the ImageIO package. The following snippet convert all the gif images in directory rootDir to jpg images.Compile this class and execute using java command line. This utility class is also available as part of the Livrona Tools Project.The following is the code for the Image Converter.