'R Session Aborted and R encountered a fatal error

I have been using Rstudio for a while and there was no problem until I was trying to install rJava and xlsx package in R. I had updated both my RGui and Rstudio to the latest version (also downloaded java x64 bit for my desktop since earlier I had a Java_Home error message trying to install both rJava and xlsx package) and I was able to install both rJava and xlsx in Rstudio, but when I use

library(xlsx)

I encountered the R session aborted message. This happen every time even when I already closed the application and tried to open it again.

I'm currently using 2022.02.2 Build 485 for my Rstudio and 4.20.0 for my RGui. Anyone knows what I can do with this?

edit: I ended up using a different package to read my excel file (read_excel) for my data which worked very well. However, I still don't know what is the problem with my 'xlsx' package



Solution 1:[1]

This issue has been discussed in RStudio Community https://community.rstudio.com/t/package-xlsx-error/136288

You should install a patched version https://cran.r-project.org/bin/windows/base/rpatched.html

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Vier Roique