rstudio / packrat

Packrat is a dependency management system for R
http://rstudio.github.io/packrat/
401 stars 89 forks source link

rJava inside packrat #281

Open wolkym opened 8 years ago

wolkym commented 8 years ago

rJava inside packrat has wierd behaviour.

If I launch rJava from a packrat repo, in the first run in throws exception, but on the second run works perfectly.

Do you have any ideas how that can happen?

> library(rJava)
> .jinit()
Exception in thread "Rengine Thread" Error in .jinit() : unable to find the RJavaTools class
> .jinit()
[1] 0
> sessionInfo()
R version 3.1.1 (2014-07-10)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_IE.UTF-8          LC_NUMERIC=C                 
 [3] LC_TIME=en_IE.UTF-8           LC_COLLATE=en_IE.UTF-8       
 [5] LC_MONETARY=en_IE.UTF-8       LC_MESSAGES=en_IE.UTF-8      
 [7] LC_PAPER=en_IE.UTF-8          LC_NAME=en_IE.UTF-8          
 [9] LC_ADDRESS=en_IE.UTF-8        LC_TELEPHONE=en_IE.UTF-8     
[11] LC_MEASUREMENT=en_IE.UTF-8    LC_IDENTIFICATION=en_IE.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] rJava_0.9-8 rj_2.0.3-2 

loaded via a namespace (and not attached):
[1] packrat_0.4.6-1 rj.gd_1.1.3-1   tools_3.1.1   

Running it installed in /usr/local indicates no issue

I have created issue in rJava repo

kevinushey commented 8 years ago

Presumedly, the RJavaTools class files are distributed as part of the rJava package. Are they present there?

What's the output of:

javaPath <- system.file("java", package = "rJava")
list.files(javaPath)

in each case?