User 8201cee929
28-06-2007 13:23:29
Hi,
I'd like to load an sd file into Molecule objects using MolImporter (JChem 3.2.7) with the following code:
When I run it I have a NullPointerException not on the read() function but on the print line. It seems that the isEndReached() doesn't find the end of the source file or I just missed something?
Thank you,
peter
I'd like to load an sd file into Molecule objects using MolImporter (JChem 3.2.7) with the following code:
Code: |
MolImporter oSDFileImporter = new MolImporter(sInputFile); while(!oSDFileImporter.isEndReached()){ Molecule oMolecule = oSDFileImporter.read(); System.out.println(oMolecule.toFormat("smiles")); //for test } |
When I run it I have a NullPointerException not on the read() function but on the print line. It seems that the isEndReached() doesn't find the end of the source file or I just missed something?
Thank you,
peter