The XJC utility will generate classes into a package name based on the target namespace. If there isn't one the by default it will put them in a package called generated. You can supply a package name as a parameter.
xjc -p com.example.foo schema.xsd
I would recommend generating each of your schemas into a separate package. When creating a JAXBContext
from classes generated from an XML schema I always recommend doing this on the package name. When there are multiple package names simply separate them with the .
character.
JAXBContect jc = JAXBContext.newInstance("com.example.foo:com.example.bar");