The government will allow Japanese companies to take part in the manufacture of parts for F-35 fighter jet as an exception to the nation's ban exporting weapons.