Someone can help me to put xml in Jme? :?

I don't have some experience with jme, and i want to put in my project something that was done in blender using jmeXMLExport, so i did what was written in the page. But when i try to run that algorithm in the page, it did not work. Any one can help please??? If i'm not clear pardo-me cause i can't speek english fluently. My algoritm is this:

public class ImportBlender {

public ImportBlender(){

String XMLFileName = "/home/detaejogos/workspace/estudo/cubo.xml";

URL modelURL = this.getClass().getClassLoader().getResource(XMLFileName);

XMLtoBinary converter = new XMLtoBinary();

JmeBinaryReader jbr = new JmeBinaryReader();

//BinaryImporter bi = new BinaryImporter();

jbr.setProperty("bound", "box");

ByteArrayOutputStream BO = new ByteArrayOutputStream();

Node modelNode = null;

try {

    converter.sendXMLtoBinary(modelURL.openStream(), BO);


    modelNode = jbr.loadBinaryFormat(new ByteArrayInputStream(BO.toByteArray()));

} catch (IOException ex) {




public static void main(String[] args) {

ImportBlender ib = ib = new ImportBlender();


The error message is this:

Exception in thread "main" java.lang.NullPointerException

at estudo.ImportBlender.<init>(

at estudo.ImportBlender.main(

Thank you for attention.

My guess is that it is having an issue finding your file.  You might try a relative path, or use File and FileInputStream.