Choose style:

Author Topic: Guide to install Java-jre in Peppermint 5  (Read 4617 times)

0 Members and 1 Guest are viewing this topic.

Offline insomniacno1

  • nOOb
  • *
  • Posts: 20
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): Peppermint 5
Guide to install Java-jre in Peppermint 5
« on: July 06, 2014, 02:51:12 pm »
This guide will teach you how to install Java-jre and make it work with Firefox(possibly other browsers too). Make sure Firefox is closed.

UPDATE: Below is for jre 7, there is an jre 8 now, so if you like that better then read the following article and make sure to have uinstalled old jre first:
http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html

First: open Synaptic package manager - then type

default-jre

in the search box in the top.

Mark default-jre for installation, by right clicking on it and choose, Mark for installation.

You will most likely, get prompted with a textbox, just click continue or Mark. Then click on Apply in the top. Wait for it to finish.

Ok, so far so good.


Second: Type

icedtea-plugin

in the search box in the top.

Mark icedtea-plugin for installation, by right clicking on it and choose, Mark for installation.

Again you will most likely, get prompted with a textbox, just click continue or Mark. Then click on Apply in the top. Wait for it to finish.

Then close Synaptic Package manager and Log-out and reboot your pc.

After starting up again, open Firefox and click on Tools then Addons. You should see IcedTea web-plugin under plugins.

It should be working now.



UPDATE: The above will install OpenJDK java version, if you should need Oracle's Java version, then read on below:


To uninstall OpenJDK:
Code:

sudo apt-get purge openjdk*

Then uninstall OpenJDK related packages:
Code:

sudo apt-get purge icedtea-* openjdk-*

If you want to check that all OpenJDK packages have been removed, just run the following
Code:

sudo dpkg --list | grep -i jdk

To uninstall Oracle Java 7, you should first check the exact version of Java you have installed before uninstalling it:
Code:

java -version
javac -version
which javaws

Next, remove the symlinks (please note that you have to replace the word version with your Java version):
Code:

sudo update-alternatives --remove "java" "/usr/lib/jvm/jdk<version>/bin/java"
sudo update-alternatives --remove "javac" "/usr/lib/jvm/jdk<version>/bin/javac"
sudo update-alternatives --remove "javaws" "/usr/lib/jvm/jdk<version>/bin/javaws"

After that:
Code:

cd /usr/lib/jvm
sudo rm -rf jdk<version>

Then do:
Code:

sudo update-alternatives --config java
sudo update-alternatives --config javac
sudo update-alternatives --config javaws

Finally edit your /etc/environment file:
Code:

sudo nano  /etc/environment

delete the line with JAVA_HOME 1, save the file and close it.

Then run this:
sudo dpkg -r --force-all oracle-jdk7-installer

Then:
sudo apt-get autoremove && sudo apt-get autoclean && sudo apt-get update

Is there any way to delete the folder /usr/lib/jvm/java-7-oracle?

Just run Code:

sudo rm -rf /usr/lib/jvm/

You should also remove Java configs and cache directory, running:
Code:

sudo bash -c 'ls -d /home/*/.java' | xargs sudo rm -rf


-------------------------------------------------------------------------------------

NEXT:

Write each line or copy and paste it in terminal:


sudo add-apt-repository ppa:webupd8team/java

sudo apt-get update

sudo apt-get install oracle-java7-installer

sudo update-java-alternatives -s java-7-oracle

Check that java is in firefox plugins and that it is activated.

If you experience dificulties with OpenJDK, here is another way to uninstall it:

sudo apt-get purge openjdk-7-jre gcj-4.7-base gcj-4.7-jre openjdk-6-jre-headless

Hope this helps someone else, I had to run all over the net to find all the nessersary info and ask in some other forums. I hope moderator will make this sticky.

JBJ
« Last Edit: June 21, 2015, 06:38:38 am by insomniacno1 »