Monday, October 14, 2013

How to change extension of multiple files (bash script)

The following is the script I use in Macbook (Mountain Lion). It should work on most *nix shell like bash, csh, ksh etc. However, I have tested it only in bash.

Monday, October 7, 2013

Correct way to embed Flash content

This A List Apart article discusses, a correct way of embedding Flash content in HTML, while following W3C standards.

If you need valid HTML content, that passes, you must use <object> tag, instead of <embed> tag.


Wednesday, October 2, 2013

JavaMail :: javax.mail.NoSuchProviderException: smtp

When you are using Java's mailapi.jar, it also expects supporting libraries like smtp.jar, imap.jar, pop3.jar, gimap.jar, dsn.jar. If you are using Java EE platform, then it is already included. But if you are getting the following error, you might have to include additional libraries, from Java mail API.

Exception in thread "main" javax.mail.NoSuchProviderException: smtp
at javax.mail.Session.getService(
at javax.mail.Session.getTransport(
at javax.mail.Session.getTransport(
at javax.mail.Session.getTransport(
at javax.mail.Session.getTransport(
at javax.mail.Transport.send0(
at javax.mail.Transport.send(

There are several forums and discussions happening on this same issue. Surprisingly, this is a small class path issue.

To solve this error, make sure you have both mailapi.jar and smtp.jar in your classpath. Also, make sure you don't have duplicate jar files in your class path.

Reading the FAQ on Oracle's documentation will give you a better idea.


Related Posts Plugin for WordPress, Blogger...