Can I use realm-java to generate .realm files only on the Java backend?

Is it possible to achieve this without relying on Android?
Because I want to generate a .realm file through the Java server and allow the mobile end to download the .realm file directly.