Hello, I am developing a code using openbabel to convert mol files into inchi
files as an internship project. First I tried the example code in Netbeans
which works fine after I add openbabel.jar but whenever I tried with Eclipse
I am getting the same error over and over and it makes me angry.  
My code is;

public void convertInto(String address,String studentNo){
        
        System.loadLibrary("openbabel_java");
        
    // Read molecule from SMILES string
    //OBConversion conv = new OBConversion();
    //OBMol mol = new OBMol();
    OBMol mol2=new OBMol();
    
    OBConversion conv2=new OBConversion();
    
    String address2="C:\\inchiFiles\\"+studentNo+".txt";
    conv2.SetInAndOutFormats("mol", "inchi");
  
    
    conv2.ReadFile(mol2, address);
    conv2.WriteFile(mol2, address2);

        }

When I run it, it gives this errors;
Exception in thread "main" java.lang.UnsatisfiedLinkError:
org.openbabel.openbabel_javaJNI.new_OBMol__SWIG_0()J
        at org.openbabel.openbabel_javaJNI.new_OBMol__SWIG_0(Native Method)
        at org.openbabel.OBMol.<init>(OBMol.java:39)
        at info.sudr.file.Converter.convertInto(Converter.java:23)
        at info.sudr.file.Main.main(Main.java:11)

If you help me to solve this, I will be really appriciated.

Thanks!!!



--
View this message in context: 
http://forums.openbabel.org/Openbabel-Unsatisfied-Link-Error-on-Java-tp4655382.html
Sent from the openbabel-devel mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel

Reply via email to