Advertisement
Tritonio

How to install the Java JDK on Raspberry Pi

Mar 15th, 2021
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1.  
  2. [Note: Later in 2013 the Pi Foundation announced Raspbian now ships with Oracle hard-float.]
  3.  
  4. The oracle 8 preview works for me, thus far. Compiling is slow on the pi, surprise, but the jre seems to run quite fast once it loads. I think bearbin's answer is pretty definitive but if you want a simple way to try oracle:
  5.  
  6. Download. You get a .tar.gz file, which is a gzipped tarball.
  7. Put the .tar.gz in /usr/local and unpack it: tar -xzf oracle8-blah-blah.tar.gz. This will create a directory with everything in it. You can rename the directory, mv oracle-jdk-whatever jdk1.8.0. Everything in there is self-contained.
  8. Put the bin/ directory at the beginning of your executable search $PATH. If there are any other javas installed, that will make this one take precedence: PATH=/usr/local/jdk1.8.0/bin:$PATH.
  9.  
  10. That will only work for your current shell. To make it the default from now on, add this to ~/.profile:
  11.  
  12. export PATH=/usr/local/jdk1.8.0/bin:$PATH
  13.  
  14. Note you must log in again to make .profile effective. However, if you are using lightdm, the default GUI login won't do this, see here for a solution.
  15.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement