Wednesday, January 15, 2014

Update JRE Java on ubuntu (java version "1.7.0_51")

1. Download Java
2. Install Java from website
or
3. Install java from website
4. กรณีเปิดใน Firefox แล้วแจ้ง Error: application blocked by security settings   ให้แก้ไขใน Firefox ดังนี้
vim /etc/apparmor.d/abstractions/ubuntu-browsers.d/java
 ---------------------------------------------Start------------------------------------
 # Java plugin
  owner @{HOME}/.java/deployment/deployment.properties k,
  /etc/java-*/ r,
  /etc/java-*/** r,
#  /usr/lib/jvm/java-6-openjdk*/jre/lib/*/IcedTeaPlugin.so mr,
#  /usr/lib/jvm/java-6-openjdk/jre/bin/java cx -> browser_openjdk,
#  /usr/lib/jvm/java-6-openjdk-{amd64,armel,armhf,i386,powerpc}/jre/bin/java cx -> browser_openjdk,
#  /usr/lib/jvm/java-*-sun-1.*/jre/bin/java{,_vm} cx -> browser_java,
#  /usr/lib/jvm/java-*-sun-1.*/jre/lib/*/libnp*.so cx -> browser_java,
  /usr/lib/j2*-ibm/jre/bin/java cx -> browser_java,

  /opt/java/32/jre1.7.*/bin/java{,_vm} cx -> browser_java,
  /opt/java/32/jre1.7.*/lib/*/libnp*.so cx -> browser_java,


ปล. เปลี่ยน Path java ให้กับ Browser ใหม่เพราะมันลิ้งไปที่ตัวเดิม
-----------------------------------------------Finish------------------------------------
Ref: apparmor

No comments: