Oracle (SUN) Java in linux browser

for chrome:

sudo mkdir -p /opt/google/chrome/plugins
cd /opt/google/chrome/plugins
sudo ln -s /usr/lib/jvm/jdk1.7.0_45/jre/lib/amd64/libjavaplugin_jni.so
sudo ln -s /usr/lib/jvm/jdk1.7.0_45/jre/lib/amd64/libnpjp2.so

Where /usr/lib/jvm/jdk1.7.0_45/ — path to java

for firefox:

mkdir -p ~/.mozilla/plugins/
cd ~/.mozilla/plugins
sudo ln -s /usr/lib/jvm/jdk1.7.0_45/jre/lib/amd64/libjavaplugin_jni.so
sudo ln -s /usr/lib/jvm/jdk1.7.0_45/jre/lib/amd64/libnpjp2.so

Where /usr/lib/jvm/jdk1.7.0_45/ — path to java

For check java version:

java -version

To find java:

$ whereis java
java: /usr/bin/java /etc/java /usr/bin/X11/java /usr/share/java /opt/jdk1.6.0_38/bin/java

go to that folder and check link

$ cd /usr/bin/
$ ls -la | grep java
-rwxr-xr-x 1 root root 2513 Мар 13 2012 dh_nativejava
lrwxrwxrwx 1 root root 22 Дек 24 2012 java -> /etc/alternatives/java
lrwxrwxrwx 1 root root 23 Ноя 26 17:09 javac -> /etc/alternatives/javac
lrwxrwxrwx 1 root root 24 Дек 25 2012 javaws -> /etc/alternatives/javaws
lrwxrwxrwx 1 root root 30 Янв 17 2013 jcontrol -> /usr/java/default/bin/jcontrol

link to link 🙂

$ cd /etc/alternatives/
$ ls -la | grep java
...
lrwxrwxrwx 1 root root 33 Ноя 26 17:10 java -> /usr/lib/jvm/jdk1.7.0_45/bin/java
lrwxrwxrwx 1 root root 34 Ноя 26 17:09 javac -> /usr/lib/jvm/jdk1.7.0_45/bin/javac
...

/usr/lib/jvm/jdk1.7.0_45/ — your result

Click here for check your java version

Добавить комментарий

Ваш адрес email не будет опубликован.