[Rdkit-discuss] Standardizer code from Java
I'm trying to get my head round using the new standardizer code from Java. Looks like this should be accessible from the RDKFuncs class, but I'm failing at stage 1. Simple example is: package org.exmple; import org.RDKit.RDKFuncs; import org.RDKit.RWMol; public class Simple { static { System.loadLibrary("GraphMolWrap"); } public static void main(String[] args) { RWMol mol1 = RWMol.MolFromSmiles("CC"); try { RWMol mol2 = RDKFuncs.cleanup(mol1); System.out.println(mol2.MolToSmiles()); }catch (Exception ex) { System.out.println("Exception! " + ex.getMessage()); ex.printStackTrace(); } } } Result is: Exception! null org.RDKit.GenericRDKitException at org.RDKit.RDKFuncsJNI.cleanup__SWIG_1(Native Method) at org.RDKit.RDKFuncs.cleanup(RDKFuncs.java:5173) at org.squonk.fragnet.Simple.main(Simple.java:15) Exception doesn't give much to go on! This is running against code on RDKit Release_2019_09 branch and using Java 11. Has anyone got this working? Tim ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] passing options to javac when building from source
Hi Tim, Try adding this to your CMake command: -DJAVA_COMPILE="/usr/bin/javac -source 8" Cheers, p. On 26/12/2019 15:22, Tim Dudgeon wrote: When building the Java wrappers from source (the -DRDK_BUILD_SWIG_WRAPPERS=ON option) is possible to specify options to pass on to javac. Specifically I'm wanting to use the '-source 8' option as most distros now come with java11 (and make it difficult to install an earlier one) but I want to build a version of org.RDKit.jar that is compatible with older Java versions. Thanks Tim ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
[Rdkit-discuss] passing options to javac when building from source
When building the Java wrappers from source (the -DRDK_BUILD_SWIG_WRAPPERS=ON option) is possible to specify options to pass on to javac. Specifically I'm wanting to use the '-source 8' option as most distros now come with java11 (and make it difficult to install an earlier one) but I want to build a version of org.RDKit.jar that is compatible with older Java versions. Thanks Tim ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss