Unknown winmail.dat attachment in email

From my colleague I received an email but with unknown type : winmail.dat
He should send me office document.
I asked him to sent it again, he forwarded the email again but I still received winmail.dat in attachment.

After googling about this I found out that winmail.dat is generated by Outlook (I using thunderbird).
From About.com :

It’s Outlook’s fault, in a way. Or the recipient’s email client’s. If Outlook sends a message using the RTF format (which is not very common outside Outlook) for bold text and other text enhancements, it includes the formatting commands in the winmail.dat file. Receiving email clients that do not understand the code therein display it as a stale attachment. To make matters worse, Outlook may also pack other, regular file attachments in the winmail.dat file.

Fortunately, you can get rid of winmail.dat altogether by making sure Outlook does not even try to send mail using RTF.

And there’s also a way to disable this feature on Outlook. You can open it for more detail.
I would focus on how non-Outlook user can handle this format.
I know I can not ask all Outlook user who sent me attachment to turn off this feature.

So I search a program to open this content type “application/ms-tnef”.
I encounter this good console program : WMdecode
You just need to extract this. When running the program it’ll search winmail.dat in current folder and extract it.
The program working great although it just console application, no GUI.

Other tool I search is add on for Thunderbird.
I found : LookOut
This add on will automatically decode the winmail.dat
Also working great but it won’t decode winmail.dat in emails that you received before installing the add-on.
So I think it’ll only decode winmail.dat on new email received.

Cheers :)

Java Application – Make sure only single/one instance running – with File Lock and ShutdownHook

Often we want to make sure that only 1 instance our application running.
Because something terrible could happen when more than 1 instance running (for example the whole server would exploded and that would make you fired ;) )

Nevertheless what the reason, one of the way to make this happen is by creating a lock file as a sign that an instance is currently running.
So you application will have this flow: Continue reading