Hi Simon, 

 

      I have some doubts in the function calling R. I am using the R 2.9.1 with 
window XP. 

      

I am passing the r list to the java method as a parameter. And then try to read 
this r list from java code. 

Is it possible that we can read the r list into the java code? My script and 
code are given below.

 

  setBTE<- function(...)

   {

        propString=match.call(expand.dots=F);

        propList=propString$...;

        propList

       

      library(rJava)

      .jinit(classpath="BTEApp.jar", parameters="-Xmx1100m") 

      .jaddClassPath("/lib/commons-lang-2.0.jar") 

      .jaddClassPath("/lib/jcommon-1.0.10.jar") 

      .jaddClassPath("lib/jfreechart-1.0.6.jar") 

      .jaddClassPath("/lib/jtds-1.2.jar") 

      .jaddClassPath("/lib/log4j.jar") 

      .jaddClassPath("/lib/util.jar")    

      .jaddClassPath("/lib/JRI.jar")    

      

       ss<-.jnew("com/bte/gui/HomePageBTE")

      .jcall(ss, "V", "initBTE", propList, check=FALSE)      

   }

 

My Java code is like:

 

public void initBTE(RList propertyList)

      {     

        bteLog.info("Calling The initBTECall method:");

        String[] k = propertyList.keys();

            if (k!=null)

            {

                  int i=0;

                  while (i<k.length) {

                     bteLog.info("Key: "+k[i++]);

                  }                       

            }           

      }

 

 

When I run this script like 

  setBTE(app.name="xyz", TP=20%)     then it is showing that method initBTE not 
found. 

 

Please help me. Thanks Simon, 

 

 

 

 

 


        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to