Josephson effects in carbon nanotube mechanical resonators and graphene