We can easily convert xsd file into .java with help of xjc tool in few steps.
Please refer below step:
1. Download xjc tool.
2. Set environmental variables.(see how to set sjc env)
3. Verify xjc environmental variable is set properly in shell/console.
4. xjc -d filename.xsd , it will generate corresponding .java and .object files.