While it is possible to compile .jrxml files into .jasper files using Java code, this incurs a performance hit that is best avoided by pre-compiling .jrxml files using the IDE. With that in mind, compiling .jrxml files can be accomplished using the JasperCompileManager as follows:
JasperCompileManager.compileReportToFile(
"designFile.jrxml", //Relative or absoulte path to the .jrxml file to compile
"compiled.jasper"); //Relative or absolute path to the compiled file .jasper