


# add-apt-repository ppa:webupd8team/java & apt-get update & apt-get install oracle-java8-installer & exec sudo "$0" Attempt to install a JDK As mentioned in the comments, breandan has updated the script to be more stable (the jetbrains website changed its behavior). But then you have to (so far) manually remove the old folder! This is what i got: It does not install java 8 and it does not ask you for the version you want to install (but the version is kept in a variable to easily change that). I have modified the scripts to fulfill my needs. It then automatically downloads the newest version for you, extracts it and creates a desktop entry. The given script in the link installs Oracle Java 7 for you and gives you the choice between Community and Ultimate Edition. I also found a shell script that does this for you, here. sktop (this is for community edition version 14.1.2, you have to change the paths in Exec= and Icon= lines if the path is different for you):

If you don't know how to do that, you can restart your PC. Now (in a lot) Ubuntu versions you can start the application after the GUI is restarted.
