So here is the solution (which I found here), just in case I need it again.
- Run sudo update-alternatives --config java (in a terminal) and pick Sun Java as the default. (I thought I'd already done that, but apparently not.)
- Add export JAVA_HOME=/usr/lib/jvm/java-6-openjdk/jre to .bashrc (again, thought I'd done that but hadn't).
- Run sudo R CMD javareconf in a terminal. (That I had done -- multiple times, with no error messages -- but apparently with the wrong configuration in place.)
- Run R as root and update the package.