CDK-R / cdkr

Integrating R and the CDK
https://cdk-r.github.io/cdkr/
42 stars 27 forks source link

Issues with rcdk.jar #47

Closed varungiri closed 7 years ago

varungiri commented 7 years ago

I am getting issues with get.fingerprint module. As far as I checked it is coming from call to get.property method. I have built the package from latest source off the master. See the following snippet

library(rcdk) a = parse.smiles('CCCO') f = get.fingerprint(a[[1]]) Error in .jcall("org/guha/rcdk/util/Misc", "Ljava/lang/Object;", "getProperty", : RcallMethod: cannot determine object class

Line 43 in props.R has following call: value <- .jcall('org/guha/rcdk/util/Misc', 'Ljava/lang/Object;', 'getProperty', molecule, as.character(key), check=FALSE) jClassPath seems to be okay and has path for rcdk.jar.

Is the error because of difference in JRE version?

.jnew('org.guha.rcdk.util.Misc') Error in .jnew("org.guha.rcdk.util.Misc") : java.lang.UnsupportedClassVersionError: org/guha/rcdk/util/Misc : Unsupported major.minor version 52.0

Though it seems that cdk-2.0.jar is also built using Java 1.8 and seems to work okay on my system.

library(rJava) .jinit(classpath = "/home/varun/R/x86_64-pc-linux-gnu-library/3.4/rcdklibs/cont/cdk-2.0.jar") .jclassPath() [1] "/home/varun/R/x86_64-pc-linux-gnu-library/3.4/rJava/java"
[2] "/home/varun/R/x86_64-pc-linux-gnu-library/3.4/rcdklibs/cont/cdk-2.0.jar" .jcall("org.openscience.cdk.CDK", "S", "getVersion") [1] "2.0"

varungiri commented 7 years ago

My bad. Did not see that the new version needs Java 1.8. With new version the problem is gone. But still do not understand why cdk-2.0.jar has no problem but rcdk.jar has, while both of them are built with 1.8.