I need help with RJava. So I run this R code: library(rJava) #load the rJava library .jinit(classpath="c:/Documents and Settings/GV/workspace/Test/src", parameters="-Xmx512m") #the above is to load the Java virtual machine, x = runif(1000) y = runif(1000) #the above are two vectors to convolve #now you can call the Java method as z=.jcall("Test", "[D", "convolve", x,y) I get an error Error in .jcall("Test", "[D", "convolve", x, y) : RcallMethod: cannot determine object class. Why is this? -- View this message in context: http://r.789695.n4.nabble.com/RJava-help-tp2995886p2995886.html Sent from the R help mailing list archive at Nabble.com.
Le 14/10/10 20:28, lord12 a ?crit :> I need help with RJava. So I run this R code: > > library(rJava) #load the rJava library > .jinit(classpath="c:/Documents and Settings/GV/workspace/Test/src", > parameters="-Xmx512m") > #the above is to load the Java virtual machine, > > > x = runif(1000) > y = runif(1000) > #the above are two vectors to convolve > > #now you can call the Java method as > z=.jcall("Test", "[D", "convolve", x,y) > > I get an error Error in .jcall("Test", "[D", "convolve", x, y) : > RcallMethod: cannot determine object class. > > Why is this?It would be useful if you showed your Test java class and repost on the appropriate mailing list for rJava: http://mailman.rz.uni-augsburg.de/mailman/listinfo/stats-rosuda-devel Romain -- Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr |- http://bit.ly/b8wOqW : LondonR Rcpp slides |- http://bit.ly/cCmbgg : Rcpp 0.8.6 `- http://bit.ly/bzoWrs : Rcpp svn revision 2000
public class my_convolve { public static void main(String[] args) { } public static void convolve() { System.out.println("Hello"); } } library(rJava) .jinit(classpath="C:/Documents and Settings/GV/workspace/Test/bin", parameters="-Xmx512m") .jcall("my_convolve", method="convolve") Error in .jcall("my_convolve", method = "convolve") : method convolve with signature ()V not found -- View this message in context: http://r.789695.n4.nabble.com/RJava-help-tp2995886p2996914.html Sent from the R help mailing list archive at Nabble.com.
u get the solution? if yes, please share it. i face same problem too -- View this message in context: http://r.789695.n4.nabble.com/RJava-help-tp2995886p4419945.html Sent from the R help mailing list archive at Nabble.com.
i saw an example in http://www.mail-archive.com/r-help at stat.math.ethz.ch/msg76159.html but an error occur Error in .jcall(?my_convolve?, ?[D?, ?convolve?, x, y) : RcallMethod: cannot determine object class because the directory of classpath? -- View this message in context: http://r.789695.n4.nabble.com/RJava-help-tp2995886p4419947.html Sent from the R help mailing list archive at Nabble.com.