The import of opioid is restricted by Japanese law

By National Police Agency Japan
You must acquire the permission by the Japanese government, when you want to bring prescribed opioid into Japan. Without the permission at your point of entry into Japan, you may be arrested.
Example:
Oxycodone
Hydrocodone
Codeine

The import of Cannabis or Cannabis derivatives is forbidden for any reason, including medical use.