[Rd] rJava System.out / System.err & stacktraces

2012-01-06 Thread kapelner
Hi,

Is there any way to initialize rJava so it can print System.out and
System.err to console? Also, is there any way to see stack traces? Otherwise
we're limited to just seeing:

> .jcall(machine, "V", "Build")
> .jcheck()
Error: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

which doesn't tell me much about the problem nor where the problem occurred
in the Java code.

If there's no way to do this, I'm just going to have to send every
System.out/err statement in my code to a log file which is a very ugly way
of doing debugging.

Thanks,
Adam


--
View this message in context: 
http://r.789695.n4.nabble.com/rJava-System-out-System-err-stacktraces-tp4270712p4270712.html
Sent from the R devel mailing list archive at Nabble.com.

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Call R function from Java

2006-07-13 Thread Adam Kapelner
Hey guys,

It worked. All I had to do is set PATH = < R directory > in my system
variables in "My Computer" and that was it!

Oh btw Simon, I couldn't find the run.bat in the JRI_0.2-4.tar.gz file. I
found a "run.in" but that is a unix bash script.

Another question:

When I'm evaluating R expressions:
REXP
rexp3=r.eval("cancer=read.table(\"CancerCellsTrainingFile.txt\",header=TRUE,
sep=\",\")");
System.out.println(rexp3);

I sometimes get back form the println:
RXP[unknown/19, id=1208787616, o=null]

Is there anyway to actually view that output as a string? I know it's not a
graphical object. It's probably a type of error message.

I'm running Windows XP, 1GB RAM, 2 x 1.8GHZ Xeon P4's, Eclipse 3.1.1,
jdk1.5.0_07, and jre1.5.0_06

Thanks,
Adam

-Original Message-
From: Simon Urbanek [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 13, 2006 11:17 AM
To: way4thesub
Subject: Re: [Rd] Call R function from Java

Adam,

On Jul 12, 2006, at 10:42 PM, way4thesub wrote:

> I am unsure how to actually import JRI into eclipse.

I don't know either, but I'd recommend using the run.bat start script  
supplied with JRI. I bet Brian's guess is correct.


> I'm sorry this is such an easy question but with the lack of FAQ's  
> and examples of JRI, I'm forced to ask it.
>

There are examples in JRI (in the "examples" directory) and JGR is  
probably the best example of the general use of JRI. At your  
suggestion I have now added a FAQ.

Cheers,
Simon

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel