Unable to load rJava on R

后端 未结 8 2057
野趣味
野趣味 2020-11-27 05:14

I wish to load rJava in R x64 3.1.2. OS- Windows 8.1 64 bit

Though installation seems to work fine:

  > install.packages(\"rJava\")
    Installing         


        
8条回答
  •  感情败类
    2020-11-27 05:18

    I get this error every time Java sneaks an update onto my PC. When I go:

    Sys.getenv("Path")
    

    I find something in the output which looks like

    C:\\Program Files \\Java\\jre1.8.0_112\\bin\\server\\
    

    where the last few digits of the jre subfolder are outdated.

    To fix this everywhere, you might want to edit the Windows environment variable. Do this by going WINDOWS + X key, selecting Command Prompt (Admin) from the menu, and typing

    rundll32.exe sysdm.cpl,EditEnvironmentVariables
    

    in the command box. This will call up this dialog box with edit rights for the PATH variable (and other system variables):

    The Windows interface for editing long environment variables is a bit unwieldy, so after I click Edit... I like to copy-paste the resulting mess of paths to Notepad.exe, do the work there, and copy-paste back.

提交回复
热议问题