J-holomorphic curves in cotangent bundles and the heat ow