To generate the java code from UML you can follow the below steps.
- New Project->EMF Project Press Next
- give the project name
- In Model Importer page select UML model and press Next
- Select UML model which is created by using Papyrus.Press next
- In Package selection page select all the root packages
- click finish, it will generate genmodel.
- Use the genmodel to generate Java code.
I hope this information helps.