Failure Installing RStudio - can't find tools.jar


I am a newbie, but I have managed to find where the likely answer to my question exists, but I am unable to gain wisdom, even when I RTFM several times.

I am not able to successfully build and install the RStudio package. And the page that likely has the answer is here: Java package guidelines

I can see that Arch Linux does NOT use the JAVA_HOME construct, but I am not sure what is next. Here is what I get as clues from bash with my attempt at makepkg -si:

==> Entering fakeroot environment...
==> Starting package()...
Unable to locate tools.jar. Expected to find it in /opt/jre1.8.0_60/lib/tools.jar
Buildfile: /home/roro/aur/rstudio/rstudio-desktop/src/rstudio-rstudio-6979d6d/src/gwt/build.xml

   [jscomp] None of the files changed. Compilation skipped.


/home/roro/aur/rstudio/rstudio-desktop/src/rstudio-rstudio-6979d6d/src/gwt/build.xml:81: Unable to find a javac compiler; is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to "/opt/jre1.8.0_60"

Total time: 0 seconds
make[2]: *** [src/gwt/CMakeFiles/gwt_build.dir/build.make:57: gwt_build] Error 1
make[1]: *** [CMakeFiles/Makefile2:112: src/gwt/CMakeFiles/gwt_build.dir/all] Error 2
make: *** [Makefile:152: all] Error 2
==> ERROR: A failure occurred in package().
[roro@rolap rstudio-desktop]$ 


I did not get such an error message installing (the at that time latest version of) rstudio from aur ( manually on an almost clean-install archlabs, so I would have to search the internet for a solution just like you. That being said, see the link I posted - apparently it is not the newest version anymore but this is the version that worked for me. There might be a problem with the new version/build.


I hope that your problem is here, tomorrow I’ll see if I fill it out

It is currently set to “/opt/jre1.8.0_60”
posted your version java whit:
java -version


The problem may be (since it appears you are compiling from source and not running a binary) JRE is a runtime environment for java apps that are already compiled. JDK would be needed in order to compile the java code to make it a binary if I recall correctly.

The build error also appears to reflect the need for the JDK and not the JRE


Right. I did install the JDK, but it still appears to point to the JRE. And when I went to the Arch Linux page about the Java quagmire, it explained that Arch Linux, unlike other distributions, does not use the construct of JAVA_HOME. Ref: Java Package Guidelines.

However, at this point I am not familiar enough with the Arch Way or confident enough to go marching off and attempting the assignments using the fairly abstract (for my purposes in my context) examples of assignment that appear near the bottom of the page… e.g.
#!/bin/sh exec /usr/bin/java -jar '/usr/share/java/ *myprogram* / *myprogram* .jar' "$@"

because, for instance, am I dealing in my case with `‘CLASSSPATH’ issues? And so on.

I fear that there is a potentially related issue at hand. When I last upgraded my distro to 4.19, I several warning messages that included unexpected permissions configurations on some directories, etc.
Thus, I am thinking that I have a perilously dirty install and that I would be better served to wipe this installation, endure the pain, and start fresh with the July 2018 version and play closer attention to what I do when I do it.

…but since I will be wiping it anyway, as soon as the thumb drive arrives, I will hammer on it for kicks and hopefully learn something. :grinning:


If you wipe your drive anyway, please try using the bin version I linked above and report back if it worked.


Did you (temporarily) set /etc/environment to determine if this can be a fix?
You could try adding something like the following ***:


You will need to know the directory it should point to and may need to either source the file or reboot. Also, it may help to remove JRE as it may be causing confusion.

It appears to work for Ubuntu (yes I know, this isn’t Ubuntu however, it is Linux and sometimes you need to think outside of the box - no matter what any wiki states)

As an alternative - I think I saw that someone installed a somewhat older version and it was a binary - that might be a better/easier option and more inline with the Arch Wiki.

And as always, YMMV

*** source:


do not: echo home, no need to install rstudio.
about installing the rstudio-desktop bin I read
Flagged out-of-date (2018-11-01)

Change default Java environment
# archlinux-java set <JAVA_ENV_NAME>


# archlinux-java set java-8-openjdk/jre

Tip: To see possible <JAVA_ENV_NAME> names, use archlinux-java status.


I am getting ready to attempt a fresh install and getting rid of 4.19 and getting the new sexy July 2018 version of AL, but I will try that later for kicks after I have backed up my critical files.

And thanks, BTW. :slight_smile:


Good luck to ya!


I am not getting the gist of what you are saying ector? Are you saying don’t install RStudio?



@chris60601 @xsme

I have good news and bad news. But first, thank you both for your input, suggestions, and concerns.

First, the bad news: I did not try installing with a workaround on the old AL install; instead, I started fresh with the new July 2018 version, as it was time for me to do so and have a renewal of sorts.

The GOOD NEWS is that with the new install, both R and RStudio installed without a hitch!


Glad to hear it worked out. Have fun with the install.


Awesome, the better news would be if you kindly mark the post within the thread which best describes the solution to your issue.

Bottom toolbar, box with a checkmark :+1: