duminică, 25 martie 2012

Cum instalez Java in BackTrack Linux

NOTE: Before installing Java make sure you kill Firefox.
root@bt:~# 
killall -9 /opt/firefox/firefox-bin
  • Downloading Java.
We can download java using wget.
root@bt:~# 
wget http://javadl.sun.com/webapps/download/AutoDL?BundleId=52240 -O /tmp/java.bin
  • Creating the directories and running the self extraction.
root@bt:~#  
mkdir -p /opt/java && cd /opt/java
root@bt:~# 
chmod +x /tmp/java.bin && /tmp/java.bin
  • Final changes.
root@bt:~# 
update-alternatives --install /usr/bin/java java /opt/java/jre1.6.?_??/bin/java 1
root@bt:~# 
update-alternatives --set java /opt/java/jre1.6.?_??/bin/java
  • Adding the plugin to Firefox.
root@bt:~#  
mkdir -p /usr/lib/mozilla/plugins/
root@bt:~#  
ln -sf /opt/java/jre1.6.?_??/lib/i386/libnpjp2.so /usr/lib/mozilla/plugins/
root@bt:~#  
export JAVA_HOME=”/opt/java/jre1.6.?_??/bin/java”
  • Testing the plugin.
root@bt:~# firefox http://java.com/en/download/testjava.jsp