Flying blue is not an airline and therefor does not have an airline code and cannot codeshare. I presume you mean Air France or Alitalia. They codeshare with Azerbaijan Airlines (J2).
I cannot find anything of the Flying Blue website that states that J2 is a Flying Blue partner. Could you share the link?
I have flown on a AF ticket and codeshare (booked an AF Code) on J2 plane from CDG to GYD a few months ago. Received points for that on my FB account. However if you book a J2 code you will not get points.
So:
1) Yes if the flight code you booked is AF/AZ
2) No, only if the flight code is AF/AZ