Dear Martin,

I have patched .createJVM creating a new method "arji_takeSameJVM" and there
inserting your code line

res = JNI_GetCreatedJavaVMs(&jvm, 1, &l);

During the compilation I get the following error messages:

rmageml.c: In function āarji_takeSameJVMā:
rmageml.c:92: error: ālā undeclared (first use in this function)
rmageml.c:92: error: (Each undeclared identifier is reported only once
rmageml.c:92: error: for each function it appears in.)
rmageml.c: In function āupdateMAGEMLā:
rmageml.c:626: warning: cast from pointer to integer of different size

As I am unfortunately not familiar with C, can you please let me know how to
declare the variable "l" ? I guess, the rest of the error messages is just a
consequence of this missing declaration as I haven't changed anything else
in the class.

Thanks a lot in advance,

best wishes
Michaela



2007/7/10, Martin Morgan <mtmorgan@fhcrc.org>:
>
> "Michaela Gündel" <michaela.guendel@googlemail.com> writes:
>
> > Dear list,
> >
> > creating a microarray workflow for my Master Thesis, I am facing a
> > problem concerning the RMAGEML package.
> >
> > I am constructing the workflow from Java using the BioC packages. I set
> > up an Rengine in Java and from this, I call R commands using
> > Rengine.eval(). The problem I am facing now is that I want to read in
> > MIAME compliant data with the RMAGEML package, which, from R directly,
> > works perfectly. However, the problem is that the package creates a JVM
> > which of course does not work calling it from an already existing JVM.
> >
> > Is there any way of
> > - either using the existing JVM in the importMAGEOM function (there:
> > mageOM <- .Call("newRMAGESTK", directory, ..rmagemlJVM@jvmptr, PACKAGE =
> > "RMAGEML") )
>
> Definitely getting your hands dirty, but the key seems to be in
> .createJVM and the line
>
>     jvmptr <- .Call("arji_createJVM", classpath, PACKAGE = "RMAGEML")
>
> The corresponding C code invokes the jvm with appropriate class path
> and other options
>
>         res = JNI_CreateJavaVM( &jvm, (void**)&env, &vm_args);
>
> and then makes it into an R external pointer and returns it
>
>     retptr = R_MakeExternalPtr( jvm, JavaVM_type_tag, R_NilValue );
>         return(retptr);
>
> Seems like you'd like to replace this with your own C level function
> that discovers the JVM
>
>      res = JNI_GetCreatedJavaVMs(&jvm, 1, &l);
>
> (this is from the source for the rJava package,
> rJava/jri/src/Rcallbacks.c). Return this as an external pointer
>
>     retptr = R_MakeExternalPtr( jvm, JavaVM_type_tag, R_NilValue );
>         return(retptr);
>
> and then patch .createJVM or importMAGEOM to use your new C call.
>
> Of course I haven't tried this ;)
>
> Martin
>
> > - or reading the MAGEML document using MAGE-STK and converting the input
> > from the then Java object to an R object that I can read into R (I am
> > working with RGLists mainly)?
> >
> > Your help is very much appreciated!
> >
> > I am using:
> >> sessionInfo()
> > R version 2.5.0 (2007-04-23)
> > i686-pc-linux-gnu
> >
> > locale:
> >
> LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=en_US.UTF-8;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C
> >
> > attached base packages:
> > [1] "tcltk" "splines" "tools" "stats" "graphics" "grDevices"
> > [7] "utils" "datasets" "methods" "base"
> >
> > other attached packages:
> > convert RMAGEML marray tkWidgets DynDoc widgetTools
> > "1.10.0" "2.10.0" "1.14.0" "1.14.0" "1.14.0" "1.12.0"
> > genefilter survival limma goCluster Biobase
> > "1.14.1" "2.31" "2.10.5" "1.4.0" "1.14.0"
> >
> > Thanks a lot in advance,
> >
> > Michaela
> >
> > --
> > Michaela Guendel
> >
> > Fraunhofer Institute for Algorithms and Scientific Computing (SCAI)
> > Department of Bioinformatics
> > Schloss Birlinghoven
> > D-53754 Sankt Augustin, Germany
> >
> >       [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > Bioconductor mailing list
> > Bioconductor@stat.math.ethz.ch
> > https://stat.ethz.ch/mailman/listinfo/bioconductor
> > Search the archives:
> http://news.gmane.org/gmane.science.biology.informatics.conductor
>
> --
> Martin Morgan
> Bioconductor / Computational Biology
> http://bioconductor.org
>

	[[alternative HTML version deleted]]

