You need to be root to write something to /opt/. As Nylex said, if u use ubuntu you can use
that prompts you for a password where you type your user password.
If you don't use ubuntu chances are you don't have configured your su commnad. So you login as root. Assuming that your username is kriogenic
Code:
$ su
password: your root password
# cd /home/kriogenic/Desktop
# mv jre/ /opt/
# exit
$ kate (or gedit or mcedit or whatever editor you like) /home/kriogenic/.bash_profile
in the end of that file you add
Code:
export PATH=$PATH:/opt/jre/bin
an java is installed in your system.
for firefox
Code:
$ su
password: your root password
# cd /usr/lib/mozilla-firefox/plugins
# ln -s /opt/jre/plugin/i386/ns7/libjavaplugin_oji.so