From edd at debian.org  Mon Feb 20 20:07:58 2006
From: edd at debian.org (Dirk Eddelbuettel)
Date: Mon, 20 Feb 2006 13:07:58 -0600
Subject: [Rd] R CMD config --cppflags buglet
In-Reply-To: <12229378-F4A0-43ED-81CE-0B1B7AB6D790@r-project.org>
References: <17401.53474.442624.424119@basebud.nulle.part>
	<Pine.LNX.4.64.0602201431330.28459@gannet.stats.ox.ac.uk>
	<17401.60588.104174.467342@basebud.nulle.part>
	<3999B172-8A10-442E-B924-0D291CFB0C15@r-project.org>
	<17401.62948.818551.564413@basebud.nulle.part>
	<12229378-F4A0-43ED-81CE-0B1B7AB6D790@r-project.org>
Message-ID: <17402.5006.879696.341356@basebud.nulle.part>


On 20 February 2006 at 13:15, Simon Urbanek wrote:
| 
| On Feb 20, 2006, at 12:01 PM, Dirk Eddelbuettel wrote:
| 
| > There is other small gotcha. I used the .deb packages sun-j2se5.0- 
| > jdk-binary and sun-j2se5.0-jre-binary which may do things  
| > differently from other JRE/JDK. In any event JGR came with
| >   /usr/lib/j2se5.0-sun//bin/java -cp JGR.jar:. -Xmx512m  
| > org.rosuda.JGR.JGR $*
| > but the path ought to be /usr/lib/j2se5.0-sun/jre/bin/java (with an  
| > added jre).  Not sure if this is worth worrying about.
| 
| 
| This is determined from the system, so the jre package should make  
| sure its "java" is picked first, otherwise you're creating a  
| dependency on jdk - i.e. make sure your jre/bin comes before jdk's  
| bin in PATH and everything should be fine.

Precisely -- The trivial shell script I wrote actually calls

    cd /opt/JGR-1.3 && java -cp JGR.jar:. -Xmx512m org.rosuda.JGR.JGR $*

as 'java' is handled The Right Way (TM) by Debian's update-alternatives(8). 
However, your Makefile doesn't know that and I was merely pointing out that 
it pasted together a wrong path using the information it otherwise used
rather successfully to build the beast.

| A special case is when JAVA_HOME is set - I have updated JRI such  
| that it will try ${JAVA_HOME}/jre/bin before ${JAVA_HOME}/bin in such  
| case.

Exactly, that would do it !

Thanks,  Dirk

-- 
Hell, there are no rules here - we're trying to accomplish something. 
                                                  -- Thomas A. Edison



[Rd] R CMD config --cppflags buglet
Dirk Eddelbuettel