Re: [R] R and Java 10 ➜ rJava not able to build

2018-04-01 Thread Luis Puerto
Thanks Peter! 

Yeah, I don’t think we users can fix this issue. Let’s wait for a fix from 
rJava team. 

Luis. 

> On 31 Mar 2018, at 17:03, peter dalgaard  wrote:
> 
> Don't waste too much time on this. It is due to a change introduced in Java 
> 10 at short notice. I believe the rJava maintainers are working on a 
> fix/workaround.
> 
> -pd
> 
>> On 31 Mar 2018, at 10:22 , John  wrote:
>> 
>> On Tue, 27 Mar 2018 22:25:33 +0300
>> Luis Puerto  wrote:
>> 
>> I don't run a Mac so this may not help.  Did you install java 10 as
>> user or as root?  Using linux, applications installed as user will be
>> inserted into your user space under /home/.  As root the
>> application will located where any user of the system with permission
>> to run the application can access it.  I ran into a problem similar to
>> this with packages, some installed as root and some installed locally
>> in my user directory.  
>> 
>> JWDougherty
>> 
>> __
>> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> 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.
> 
> -- 
> Peter Dalgaard, Professor,
> Center for Statistics, Copenhagen Business School
> Solbjerg Plads 3, 2000 Frederiksberg, Denmark
> Phone: (+45)38153501
> Office: A 4.23
> Email: pd@cbs.dk  Priv: pda...@gmail.com
> 
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.


Re: [R] R and Java 10 ➜ rJava not able to build

2018-04-01 Thread Luis Puerto
Hi John! 

Java was installed with Homebrew Cask as a user, if my memory doesn’t fail me. 

Thanks a lot for your help! Let’s see how the problem evolves. 

> On 31 Mar 2018, at 11:22, John  wrote:
> 
> On Tue, 27 Mar 2018 22:25:33 +0300
> Luis Puerto  wrote:
> 
> I don't run a Mac so this may not help.  Did you install java 10 as
> user or as root?  Using linux, applications installed as user will be
> inserted into your user space under /home/.  As root the
> application will located where any user of the system with permission
> to run the application can access it.  I ran into a problem similar to
> this with packages, some installed as root and some installed locally
> in my user directory.  
> 
> JWDougherty
> 
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.


Re: [R] R and Java 10 ➜ rJava not able to build

2018-03-31 Thread peter dalgaard
Don't waste too much time on this. It is due to a change introduced in Java 10 
at short notice. I believe the rJava maintainers are working on a 
fix/workaround.

-pd

> On 31 Mar 2018, at 10:22 , John  wrote:
> 
> On Tue, 27 Mar 2018 22:25:33 +0300
> Luis Puerto  wrote:
> 
> I don't run a Mac so this may not help.  Did you install java 10 as
> user or as root?  Using linux, applications installed as user will be
> inserted into your user space under /home/.  As root the
> application will located where any user of the system with permission
> to run the application can access it.  I ran into a problem similar to
> this with packages, some installed as root and some installed locally
> in my user directory.  
> 
> JWDougherty
> 
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: pd@cbs.dk  Priv: pda...@gmail.com

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.


Re: [R] R and Java 10 ➜ rJava not able to build

2018-03-31 Thread John
On Tue, 27 Mar 2018 22:25:33 +0300
Luis Puerto  wrote:

I don't run a Mac so this may not help.  Did you install java 10 as
user or as root?  Using linux, applications installed as user will be
inserted into your user space under /home/.  As root the
application will located where any user of the system with permission
to run the application can access it.  I ran into a problem similar to
this with packages, some installed as root and some installed locally
in my user directory.  

JWDougherty

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.


Re: [R] R and Java 10 ➜ rJava not able to build

2018-03-28 Thread Luis Puerto
Hi Ista! 

Thanks a lot for your support!! 

It puzzles me because it’s the first time that something like this happens to 
me. I’m aware that root and user don’t have the same environmental variables 
here. However, I don’t know why root chooses Java 9 and my user chooses Java 
10. Isn’t Java 10 ready to be used as a root? 

It seems that we are going to have to wait until rJava releases a new version 
and use Java 9 till then. I don’t have any problem with this. To be honest, I 
found out that Java jumped a version 10 because my wife was running out of 
space in her MacBook Air and checking for things to delete find she has 4 
different versions of Java 1.8, 9.0.1, 9.0.4 and 10. Then just it occurred to 
me that perhaps I could config R with Java 10 and delete all the other version. 
Also in my computer… Then was when I came across all of these. 

Again, thanks a lot for your support! 

Best Regards
Luis Puerto
http://luisspuerto.net 
> On 28 Mar 2018, at 17:04, Ista Zahn  > wrote:
> 
> On Wed, Mar 28, 2018 at 3:56 AM, Luis Puerto  > wrote:
>> Hi Jeff!!
>> 
>> I really don’t know if running R CMD javareconf with sudo has posed a 
>> problem here, now or in the past. What I know is sometimes it’s the only way 
>> to really config it, if I don’t run with sudo, in the end it asks me if I 
>> want to overwrite the configuration from root
>> 
>> override rw-r--r--  root/admin for
>> /usr/local/Cellar/r/3.4.4/lib/R/etc/Makeconf? (y/n [n]) y
>> override rw-r--r--  root/admin for
>> /usr/local/Cellar/r/3.4.4/lib/R/etc/ldpaths? (y/n [n]) y
>> 
>> So I really don’t know if this is the problem here or not.
>> 
>> I really think the problem for R is and rJava is there is no longer a javah 
>> file.
>> 
>> Unable to locate an executable at
>> "/Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home/bin/javah"
>> (-1)
>> 
>> Anyhow… I’m still puzzle by the fact that R CMD javareconf with sudo and 
>> without has different outcome.
> 
> Why does this puzzle you? There is no reason to expect the root user's
> environment to be the same as your user environment. You can look at
> 
> env > me.txt
> sudo env ? root.txt
> diff me.txt root.txt
> 
> to see the differences.
> 
>> 
>>> configuring Java is not on-topic here
>> 
>> I can't understand why. The problem isn’t java itself but the tool to 
>> configure R to use it with a new version.
>> 
>> Reading the released notes for Java 10:
>> 
>>> tools/javah
>>> >>  
>>> >
>>>  JEP 313 Remove the Native-Header Generation Tool (javah)
>>> As previously announced, the native-header tool, javah, has been removed.
>>> 
>>> Native headers can now be generated by using the Java compiler, javac, with 
>>> the -h option.
>>> 
>>> See JDK-8182758 >> >
>> 
>> I don’t know if this can be fixed parsing an option in R CMD javareconf that 
>> points JAVAH to JAVAC -h
> 
> I think you're on the right track here. I tried building rJava with R
> configured to use openJDK 10 and got the same error you did. It
> appears that rJava does not currently build under openJDK 10. You did
> the right thing by opening an issue at
> https://github.com/s-u/rJava/issues/137 
>  -- now you just wait to see
> what the rJava developers have to say about it. In the meantime, use
> JDK 9.
> 
> Best,
> Ista
> 
> 
>> 
>> 
>> 
>>> On 28 Mar 2018, at 04:39, Jeff Newmiller >> > wrote:
>>> 
>>> I am not a Mac user, but I do use Linux and I would recommend not running R 
>>> with sudo unless you are an admin ninja. That defensive practice would 
>>> render the answer to your question moot.
>>> 
>>> It is possible that your problem may have started with inappropriate use of 
>>> sudo in configuring java, but configuring Java is not on-topic here.
>>> --
>>> Sent from my phone. Please excuse my brevity.
>>> 
>>> On March 27, 2018 12:25:33 PM PDT, Luis Puerto >>  >> >> wrote:
 Hi!
 
 I’m on macOS 10.13.3 and just installed the new Java 10 using Homebrew
 Cask. I also have installed R with Homebrew. Everything seems to work
 fine, however I just get different outputs if I run sudo R CMD
 javareconf or R CMD javareconf. With sudo I get pointed to Java 9 and
 without sudo I get pointed to Java 10. I really don’t know why.
 
 Without sudo:
 
 $ R CMD javareconf
 
 Java interpreter :
 /Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home/bin/java
 Java version : 10
 Java home path   :
 /Library/Java/JavaVirtualMachine

Re: [R] R and Java 10 ➜ rJava not able to build

2018-03-28 Thread Ista Zahn
On Wed, Mar 28, 2018 at 3:56 AM, Luis Puerto  wrote:
> Hi Jeff!!
>
> I really don’t know if running R CMD javareconf with sudo has posed a problem 
> here, now or in the past. What I know is sometimes it’s the only way to 
> really config it, if I don’t run with sudo, in the end it asks me if I want 
> to overwrite the configuration from root
>
> override rw-r--r--  root/admin for
> /usr/local/Cellar/r/3.4.4/lib/R/etc/Makeconf? (y/n [n]) y
> override rw-r--r--  root/admin for
> /usr/local/Cellar/r/3.4.4/lib/R/etc/ldpaths? (y/n [n]) y
>
> So I really don’t know if this is the problem here or not.
>
> I really think the problem for R is and rJava is there is no longer a javah 
> file.
>
> Unable to locate an executable at
> "/Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home/bin/javah"
> (-1)
>
> Anyhow… I’m still puzzle by the fact that R CMD javareconf with sudo and 
> without has different outcome.

Why does this puzzle you? There is no reason to expect the root user's
environment to be the same as your user environment. You can look at

env > me.txt
sudo env > root.txt
diff me.txt root.txt

to see the differences.

>
>> configuring Java is not on-topic here
>
> I can't understand why. The problem isn’t java itself but the tool to 
> configure R to use it with a new version.
>
> Reading the released notes for Java 10:
>
>> tools/javah
>>  
>> 
>>  JEP 313 Remove the Native-Header Generation Tool (javah)
>> As previously announced, the native-header tool, javah, has been removed.
>>
>> Native headers can now be generated by using the Java compiler, javac, with 
>> the -h option.
>>
>> See JDK-8182758 
>
> I don’t know if this can be fixed parsing an option in R CMD javareconf that 
> points JAVAH to JAVAC -h

I think you're on the right track here. I tried building rJava with R
configured to use openJDK 10 and got the same error you did. It
appears that rJava does not currently build under openJDK 10. You did
the right thing by opening an issue at
https://github.com/s-u/rJava/issues/137 -- now you just wait to see
what the rJava developers have to say about it. In the meantime, use
JDK 9.

Best,
Ista

>
>
>
>> On 28 Mar 2018, at 04:39, Jeff Newmiller  wrote:
>>
>> I am not a Mac user, but I do use Linux and I would recommend not running R 
>> with sudo unless you are an admin ninja. That defensive practice would 
>> render the answer to your question moot.
>>
>> It is possible that your problem may have started with inappropriate use of 
>> sudo in configuring java, but configuring Java is not on-topic here.
>> --
>> Sent from my phone. Please excuse my brevity.
>>
>> On March 27, 2018 12:25:33 PM PDT, Luis Puerto > > wrote:
>>> Hi!
>>>
>>> I’m on macOS 10.13.3 and just installed the new Java 10 using Homebrew
>>> Cask. I also have installed R with Homebrew. Everything seems to work
>>> fine, however I just get different outputs if I run sudo R CMD
>>> javareconf or R CMD javareconf. With sudo I get pointed to Java 9 and
>>> without sudo I get pointed to Java 10. I really don’t know why.
>>>
>>> Without sudo:
>>>
>>> $ R CMD javareconf
>>>
>>> Java interpreter :
>>> /Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home/bin/java
>>> Java version : 10
>>> Java home path   :
>>> /Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home
>>> Java compiler:
>>> /Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home/bin/javac
>>> Java headers gen.: /usr/bin/javah
>>> Java archive tool:
>>> /Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home/bin/jar
>>> Non-system Java on macOS
>>>
>>> trying to compile and link a JNI program
>>> detected JNI cpp flags: -I$(JAVA_HOME)/include
>>> -I$(JAVA_HOME)/include/darwin
>>> detected JNI linker flags : -L$(JAVA_HOME)/lib/server -ljvm
>>> /usr/local/opt/llvm/bin/clang
>>> -I/usr/local/Cellar/r/3.4.4/lib/R/include -DNDEBUG
>>> -I/Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home/include
>>> -I/Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home/include/darwin
>>> -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include   -fPIC
>>> -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c conftest.c -o
>>> conftest.o
>>> /usr/local/opt/llvm/bin/clang++ -dynamiclib
>>> -Wl,-headerpad_max_install_names -undefined dynamic_lookup
>>> -single_module -multiply_defined suppress -L/usr/local/opt/gettext/lib
>>> -L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib
>>> -L/usr/local/Cellar/r/3.4.4/lib/R/lib -L/usr/local/opt/gettext/lib
>>> -L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib -o
>>> conftest.so conftest.o
>>> -L/Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home/lib/server
>>> -ljvm -L/usr/local/Cellar/r/3.4.4/lib/R/lib -lR -lintl -Wl,-framework
>>> -Wl,CoreFoundation
>>>
>>>
>>> JAVA_HOME:
>>> /Library/Java/JavaVirtu

Re: [R] R and Java 10 ➜ rJava not able to build

2018-03-28 Thread Ista Zahn
On Tue, Mar 27, 2018 at 9:39 PM, Jeff Newmiller
 wrote:
> I am not a Mac user, but I do use Linux and I would recommend not running R 
> with sudo unless you are an admin ninja. That defensive practice would render 
> the answer to your question moot.

I don't think this is reasonable advice, given that both R CMD
javareconf and the rJava package makefile explicitly instruct you to
run R CMD javareconf as root.


>
> It is possible that your problem may have started with inappropriate use of 
> sudo in configuring java, but configuring Java is not on-topic here.

I also disagree with this. You don't have to answer if you don't want
to, but the question is about getting the rJava package to work with
Java JDK 10, and I for one consider that to be on-topic here.


Best,
Ista

> --
> Sent from my phone. Please excuse my brevity.
>
> On March 27, 2018 12:25:33 PM PDT, Luis Puerto  wrote:
>>Hi!
>>
>>I’m on macOS 10.13.3 and just installed the new Java 10 using Homebrew
>>Cask. I also have installed R with Homebrew. Everything seems to work
>>fine, however I just get different outputs if I run sudo R CMD
>>javareconf or R CMD javareconf. With sudo I get pointed to Java 9 and
>>without sudo I get pointed to Java 10. I really don’t know why.
>>
>>Without sudo:
>>
>>$ R CMD javareconf
>>
>>Java interpreter :
>>/Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home/bin/java
>>Java version : 10
>>Java home path   :
>>/Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home
>>Java compiler:
>>/Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home/bin/javac
>>Java headers gen.: /usr/bin/javah
>>Java archive tool:
>>/Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home/bin/jar
>>Non-system Java on macOS
>>
>>trying to compile and link a JNI program
>>detected JNI cpp flags: -I$(JAVA_HOME)/include
>>-I$(JAVA_HOME)/include/darwin
>>detected JNI linker flags : -L$(JAVA_HOME)/lib/server -ljvm
>>/usr/local/opt/llvm/bin/clang
>>-I/usr/local/Cellar/r/3.4.4/lib/R/include -DNDEBUG
>>-I/Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home/include
>>-I/Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home/include/darwin
>>-I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include   -fPIC
>>-g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c conftest.c -o
>>conftest.o
>>/usr/local/opt/llvm/bin/clang++ -dynamiclib
>>-Wl,-headerpad_max_install_names -undefined dynamic_lookup
>>-single_module -multiply_defined suppress -L/usr/local/opt/gettext/lib
>>-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib
>>-L/usr/local/Cellar/r/3.4.4/lib/R/lib -L/usr/local/opt/gettext/lib
>>-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib -o
>>conftest.so conftest.o
>>-L/Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home/lib/server
>>-ljvm -L/usr/local/Cellar/r/3.4.4/lib/R/lib -lR -lintl -Wl,-framework
>>-Wl,CoreFoundation
>>
>>
>>JAVA_HOME:
>>/Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home
>>Java library path: $(JAVA_HOME)/lib/server
>>JNI cpp flags: -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/darwin
>>JNI linker flags : -L$(JAVA_HOME)/lib/server -ljvm
>>Updating Java configuration in /usr/local/Cellar/r/3.4.4/lib/R
>>override rw-r--r--  root/admin for
>>/usr/local/Cellar/r/3.4.4/lib/R/etc/Makeconf? (y/n [n]) y
>>override rw-r--r--  root/admin for
>>/usr/local/Cellar/r/3.4.4/lib/R/etc/ldpaths? (y/n [n]) y
>>Done.
>>With sudo:
>>
>>$ sudo R CMD javareconf
>>
>>Java interpreter :
>>/Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home/bin/java
>>Java version : 9.0.4
>>Java home path   :
>>/Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home
>>Java compiler:
>>/Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home/bin/javac
>>Java headers gen.:
>>/Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home/bin/javah
>>Java archive tool:
>>/Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home/bin/jar
>>Non-system Java on macOS
>>
>>trying to compile and link a JNI program
>>detected JNI cpp flags: -I$(JAVA_HOME)/include
>>-I$(JAVA_HOME)/include/darwin
>>detected JNI linker flags : -L$(JAVA_HOME)/lib/server -ljvm
>>/usr/local/opt/llvm/bin/clang
>>-I/usr/local/Cellar/r/3.4.4/lib/R/include -DNDEBUG
>>-I/Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home/include
>>-I/Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home/include/darwin
>>-I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include   -fPIC
>>-g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c conftest.c -o
>>conftest.o
>>/usr/local/opt/llvm/bin/clang++ -dynamiclib
>>-Wl,-headerpad_max_install_names -undefined dynamic_lookup
>>-single_module -multiply_defined suppress -L/usr/local/opt/gettext/lib
>>-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib
>>-L/usr/local/Cellar/r/3.4.4/lib/R/lib -L/usr/local/opt/gettext/lib
>>-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib -o
>>conftest.so conftest.o
>>-L/Library/Java/J

Re: [R] R and Java 10 ➜ rJava not able to build

2018-03-28 Thread Luis Puerto
Hi Jeff!! 

I really don’t know if running R CMD javareconf with sudo has posed a problem 
here, now or in the past. What I know is sometimes it’s the only way to really 
config it, if I don’t run with sudo, in the end it asks me if I want to 
overwrite the configuration from root 

override rw-r--r--  root/admin for
/usr/local/Cellar/r/3.4.4/lib/R/etc/Makeconf? (y/n [n]) y
override rw-r--r--  root/admin for
/usr/local/Cellar/r/3.4.4/lib/R/etc/ldpaths? (y/n [n]) y

So I really don’t know if this is the problem here or not. 

I really think the problem for R is and rJava is there is no longer a javah 
file. 

Unable to locate an executable at
"/Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home/bin/javah"
(-1)

Anyhow… I’m still puzzle by the fact that R CMD javareconf with sudo and 
without has different outcome. 

> configuring Java is not on-topic here

I can't understand why. The problem isn’t java itself but the tool to configure 
R to use it with a new version. 

Reading the released notes for Java 10: 

> tools/javah
>  
> 
>  JEP 313 Remove the Native-Header Generation Tool (javah) 
> As previously announced, the native-header tool, javah, has been removed.
> 
> Native headers can now be generated by using the Java compiler, javac, with 
> the -h option.
> 
> See JDK-8182758 

I don’t know if this can be fixed parsing an option in R CMD javareconf that 
points JAVAH to JAVAC -h 



> On 28 Mar 2018, at 04:39, Jeff Newmiller  wrote:
> 
> I am not a Mac user, but I do use Linux and I would recommend not running R 
> with sudo unless you are an admin ninja. That defensive practice would render 
> the answer to your question moot.
> 
> It is possible that your problem may have started with inappropriate use of 
> sudo in configuring java, but configuring Java is not on-topic here.
> -- 
> Sent from my phone. Please excuse my brevity.
> 
> On March 27, 2018 12:25:33 PM PDT, Luis Puerto  > wrote:
>> Hi! 
>> 
>> I’m on macOS 10.13.3 and just installed the new Java 10 using Homebrew
>> Cask. I also have installed R with Homebrew. Everything seems to work
>> fine, however I just get different outputs if I run sudo R CMD
>> javareconf or R CMD javareconf. With sudo I get pointed to Java 9 and
>> without sudo I get pointed to Java 10. I really don’t know why. 
>> 
>> Without sudo:
>> 
>> $ R CMD javareconf 
>> 
>> Java interpreter :
>> /Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home/bin/java
>> Java version : 10
>> Java home path   :
>> /Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home
>> Java compiler:
>> /Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home/bin/javac
>> Java headers gen.: /usr/bin/javah
>> Java archive tool:
>> /Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home/bin/jar
>> Non-system Java on macOS
>> 
>> trying to compile and link a JNI program
>> detected JNI cpp flags: -I$(JAVA_HOME)/include
>> -I$(JAVA_HOME)/include/darwin
>> detected JNI linker flags : -L$(JAVA_HOME)/lib/server -ljvm
>> /usr/local/opt/llvm/bin/clang 
>> -I/usr/local/Cellar/r/3.4.4/lib/R/include -DNDEBUG
>> -I/Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home/include
>> -I/Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home/include/darwin
>> -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include   -fPIC 
>> -g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c conftest.c -o
>> conftest.o
>> /usr/local/opt/llvm/bin/clang++ -dynamiclib
>> -Wl,-headerpad_max_install_names -undefined dynamic_lookup
>> -single_module -multiply_defined suppress -L/usr/local/opt/gettext/lib
>> -L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib
>> -L/usr/local/Cellar/r/3.4.4/lib/R/lib -L/usr/local/opt/gettext/lib
>> -L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib -o
>> conftest.so conftest.o
>> -L/Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home/lib/server
>> -ljvm -L/usr/local/Cellar/r/3.4.4/lib/R/lib -lR -lintl -Wl,-framework
>> -Wl,CoreFoundation
>> 
>> 
>> JAVA_HOME:
>> /Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home
>> Java library path: $(JAVA_HOME)/lib/server
>> JNI cpp flags: -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/darwin
>> JNI linker flags : -L$(JAVA_HOME)/lib/server -ljvm
>> Updating Java configuration in /usr/local/Cellar/r/3.4.4/lib/R
>> override rw-r--r--  root/admin for
>> /usr/local/Cellar/r/3.4.4/lib/R/etc/Makeconf? (y/n [n]) y
>> override rw-r--r--  root/admin for
>> /usr/local/Cellar/r/3.4.4/lib/R/etc/ldpaths? (y/n [n]) y
>> Done.
>> With sudo:
>> 
>> $ sudo R CMD javareconf
>> 
>> Java interpreter :
>> /Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home/bin/java
>> Java version : 9.0.4
>> Java home path   :
>>

Re: [R] R and Java 10 ➜ rJava not able to build

2018-03-27 Thread Jeff Newmiller
I am not a Mac user, but I do use Linux and I would recommend not running R 
with sudo unless you are an admin ninja. That defensive practice would render 
the answer to your question moot.

It is possible that your problem may have started with inappropriate use of 
sudo in configuring java, but configuring Java is not on-topic here.
-- 
Sent from my phone. Please excuse my brevity.

On March 27, 2018 12:25:33 PM PDT, Luis Puerto  wrote:
>Hi! 
>
>I’m on macOS 10.13.3 and just installed the new Java 10 using Homebrew
>Cask. I also have installed R with Homebrew. Everything seems to work
>fine, however I just get different outputs if I run sudo R CMD
>javareconf or R CMD javareconf. With sudo I get pointed to Java 9 and
>without sudo I get pointed to Java 10. I really don’t know why. 
>
>Without sudo:
>
>$ R CMD javareconf 
>  
>Java interpreter :
>/Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home/bin/java
>Java version : 10
>Java home path   :
>/Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home
>Java compiler:
>/Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home/bin/javac
>Java headers gen.: /usr/bin/javah
>Java archive tool:
>/Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home/bin/jar
>Non-system Java on macOS
>
>trying to compile and link a JNI program
>detected JNI cpp flags: -I$(JAVA_HOME)/include
>-I$(JAVA_HOME)/include/darwin
>detected JNI linker flags : -L$(JAVA_HOME)/lib/server -ljvm
>/usr/local/opt/llvm/bin/clang 
>-I/usr/local/Cellar/r/3.4.4/lib/R/include -DNDEBUG
>-I/Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home/include
>-I/Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home/include/darwin
>-I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include   -fPIC 
>-g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c conftest.c -o
>conftest.o
>/usr/local/opt/llvm/bin/clang++ -dynamiclib
>-Wl,-headerpad_max_install_names -undefined dynamic_lookup
>-single_module -multiply_defined suppress -L/usr/local/opt/gettext/lib
>-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib
>-L/usr/local/Cellar/r/3.4.4/lib/R/lib -L/usr/local/opt/gettext/lib
>-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib -o
>conftest.so conftest.o
>-L/Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home/lib/server
>-ljvm -L/usr/local/Cellar/r/3.4.4/lib/R/lib -lR -lintl -Wl,-framework
>-Wl,CoreFoundation
>
>
>JAVA_HOME:
>/Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home
>Java library path: $(JAVA_HOME)/lib/server
>JNI cpp flags: -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/darwin
>JNI linker flags : -L$(JAVA_HOME)/lib/server -ljvm
>Updating Java configuration in /usr/local/Cellar/r/3.4.4/lib/R
>override rw-r--r--  root/admin for
>/usr/local/Cellar/r/3.4.4/lib/R/etc/Makeconf? (y/n [n]) y
>override rw-r--r--  root/admin for
>/usr/local/Cellar/r/3.4.4/lib/R/etc/ldpaths? (y/n [n]) y
>Done.
>With sudo:
>
>$ sudo R CMD javareconf
>  
>Java interpreter :
>/Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home/bin/java
>Java version : 9.0.4
>Java home path   :
>/Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home
>Java compiler:
>/Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home/bin/javac
>Java headers gen.:
>/Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home/bin/javah
>Java archive tool:
>/Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home/bin/jar
>Non-system Java on macOS
>
>trying to compile and link a JNI program
>detected JNI cpp flags: -I$(JAVA_HOME)/include
>-I$(JAVA_HOME)/include/darwin
>detected JNI linker flags : -L$(JAVA_HOME)/lib/server -ljvm
>/usr/local/opt/llvm/bin/clang 
>-I/usr/local/Cellar/r/3.4.4/lib/R/include -DNDEBUG
>-I/Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home/include
>-I/Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home/include/darwin
>-I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include   -fPIC 
>-g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe -c conftest.c -o
>conftest.o
>/usr/local/opt/llvm/bin/clang++ -dynamiclib
>-Wl,-headerpad_max_install_names -undefined dynamic_lookup
>-single_module -multiply_defined suppress -L/usr/local/opt/gettext/lib
>-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib
>-L/usr/local/Cellar/r/3.4.4/lib/R/lib -L/usr/local/opt/gettext/lib
>-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib -o
>conftest.so conftest.o
>-L/Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home/lib/server
>-ljvm -L/usr/local/Cellar/r/3.4.4/lib/R/lib -lR -lintl -Wl,-framework
>-Wl,CoreFoundation
>
>
>JAVA_HOME:
>/Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home
>Java library path: $(JAVA_HOME)/lib/server
>JNI cpp flags: -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/darwin
>JNI linker flags : -L$(JAVA_HOME)/lib/server -ljvm

[R] R and Java 10 ➜ rJava not able to build

2018-03-27 Thread Luis Puerto
Hi! 

I’m on macOS 10.13.3 and just installed the new Java 10 using Homebrew Cask. I 
also have installed R with Homebrew. Everything seems to work fine, however I 
just get different outputs if I run sudo R CMD javareconf or R CMD javareconf. 
With sudo I get pointed to Java 9 and without sudo I get pointed to Java 10. I 
really don’t know why. 

Without sudo:

$ R CMD javareconf  
  
Java interpreter : 
/Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home/bin/java
Java version : 10
Java home path   : /Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home
Java compiler: 
/Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home/bin/javac
Java headers gen.: /usr/bin/javah
Java archive tool: 
/Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home/bin/jar
Non-system Java on macOS

trying to compile and link a JNI program
detected JNI cpp flags: -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/darwin
detected JNI linker flags : -L$(JAVA_HOME)/lib/server -ljvm
/usr/local/opt/llvm/bin/clang  -I/usr/local/Cellar/r/3.4.4/lib/R/include 
-DNDEBUG -I/Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home/include 
-I/Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home/include/darwin  
-I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include   -fPIC  -g -O3 
-Wall -pedantic -std=gnu99 -mtune=native -pipe -c conftest.c -o conftest.o
/usr/local/opt/llvm/bin/clang++ -dynamiclib -Wl,-headerpad_max_install_names 
-undefined dynamic_lookup -single_module -multiply_defined suppress 
-L/usr/local/opt/gettext/lib -L/usr/local/opt/llvm/lib 
-Wl,-rpath,/usr/local/opt/llvm/lib -L/usr/local/Cellar/r/3.4.4/lib/R/lib 
-L/usr/local/opt/gettext/lib -L/usr/local/opt/llvm/lib 
-Wl,-rpath,/usr/local/opt/llvm/lib -o conftest.so conftest.o 
-L/Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home/lib/server -ljvm 
-L/usr/local/Cellar/r/3.4.4/lib/R/lib -lR -lintl -Wl,-framework 
-Wl,CoreFoundation


JAVA_HOME: /Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home
Java library path: $(JAVA_HOME)/lib/server
JNI cpp flags: -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/darwin
JNI linker flags : -L$(JAVA_HOME)/lib/server -ljvm
Updating Java configuration in /usr/local/Cellar/r/3.4.4/lib/R
override rw-r--r--  root/admin for 
/usr/local/Cellar/r/3.4.4/lib/R/etc/Makeconf? (y/n [n]) y
override rw-r--r--  root/admin for /usr/local/Cellar/r/3.4.4/lib/R/etc/ldpaths? 
(y/n [n]) y
Done.
With sudo:

$ sudo R CMD javareconf 
  
Java interpreter : 
/Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home/bin/java
Java version : 9.0.4
Java home path   : /Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home
Java compiler: 
/Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home/bin/javac
Java headers gen.: 
/Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home/bin/javah
Java archive tool: 
/Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home/bin/jar
Non-system Java on macOS

trying to compile and link a JNI program
detected JNI cpp flags: -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/darwin
detected JNI linker flags : -L$(JAVA_HOME)/lib/server -ljvm
/usr/local/opt/llvm/bin/clang  -I/usr/local/Cellar/r/3.4.4/lib/R/include 
-DNDEBUG 
-I/Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home/include 
-I/Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home/include/darwin  
-I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include   -fPIC  -g -O3 
-Wall -pedantic -std=gnu99 -mtune=native -pipe -c conftest.c -o conftest.o
/usr/local/opt/llvm/bin/clang++ -dynamiclib -Wl,-headerpad_max_install_names 
-undefined dynamic_lookup -single_module -multiply_defined suppress 
-L/usr/local/opt/gettext/lib -L/usr/local/opt/llvm/lib 
-Wl,-rpath,/usr/local/opt/llvm/lib -L/usr/local/Cellar/r/3.4.4/lib/R/lib 
-L/usr/local/opt/gettext/lib -L/usr/local/opt/llvm/lib 
-Wl,-rpath,/usr/local/opt/llvm/lib -o conftest.so conftest.o 
-L/Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home/lib/server 
-ljvm -L/usr/local/Cellar/r/3.4.4/lib/R/lib -lR -lintl -Wl,-framework 
-Wl,CoreFoundation


JAVA_HOME: /Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home
Java library path: $(JAVA_HOME)/lib/server
JNI cpp flags: -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/darwin
JNI linker flags : -L$(JAVA_HOME)/lib/server -ljvm
Updating Java configuration in /usr/local/Cellar/r/3.4.4/lib/R
Done.
The result of be pointed to Java 10 is rJava package not be able to build. 

warning: [options] bootstrap class path not set in conjunction with -source 6
warning: [options] source value 6 is obsolete and will be removed in a future 
release
warning: [options] target value 1.6 is obsolete and will be removed in a future 
release
warning: [options] To suppress warnings about obsolete options, use 
-Xlint:-options.
Note: Some input f

Re: [R] R and Java

2010-08-20 Thread Romain Francois


Le 20/08/10 17:56, Allan Freitas a écrit :


Hi folks,

Maybe that is not the best place to ask,


No it is not, this is: 
http://mailman.rz.uni-augsburg.de/mailman/listinfo/stats-rosuda-devel



but I 'd like some of you could  help me...



I'm using jri to run R commands under Java, by its examples I can eval
expressions, returning single values or vectors to my Java variables. But, I
would like to know how to assign the values of a Java vector (like: double
x[] = {1.7 , 2.8 , 3.4};  ) to a R variable, so I can eval a function using
it (like: mean(x) ).

Someone could help me?

Best regards,


Perhaps you can give some more meat to your question, write some code 
with what you tried, why it failed, etc ... and repost on the 
appropriate mailing list (see above).


hint: 
http://rforge.net/Rserve/doc/org/rosuda/REngine/REngine.html#assign%28java.lang.String,%20double[]%29


Romain

--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
http://romainfrancois.blog.free.fr
|- http://bit.ly/bzoWrs : Rcpp svn revision 2000
|- http://bit.ly/b8VNE2 : Rcpp at LondonR, oct 5th
`- http://bit.ly/aAyra4 : highlight 0.2-2

__
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.


[R] R and Java

2010-08-20 Thread Allan Freitas
Hi folks,

Maybe that is not the best place to ask, but I 'd like some of you could
help me...

I'm using jri to run R commands under Java, by its examples I can eval
expressions, returning single values or vectors to my Java variables. But, I
would like to know how to assign the values of a Java vector (like: double
x[] = {1.7 , 2.8 , 3.4};  ) to a R variable, so I can eval a function using
it (like: mean(x) ).

Someone could help me?

Best regards,

-- 
prof. Allan Edgard Silva Freitas, MSc.
Instituto Federal da Bahia
Campus de Salvador
DTTE
+55-71-2102-9508
+55-71-9959-4570

[[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.