Wednesday, August 17, 2011

Mime type of file in Java


File f = new File("sample.gif");
System.out.println("Mime Type of " + f.getName() + " is " +
new MimetypesFileTypeMap().getContentType(f));

More Reference :
http://www.rgagnon.com/javadetails/java-0487.html

OutOfMemoryError in Eclipse

OutOfMemoryError in Eclipse,

Window -> Preferences -> Java -> InstalledJRE -> Edit -> Default VM arguments


-Xms128M -Xmx1024M



Class Loader & ClassNotFound exception in WebSphere

http://josephamrithraj.wordpress.com/2010/02/24/class-loader-classnotfound-exception-in-websphere/