Install Java JRE 1.6.0 (Update x) in Linux as the Default Java Runtime, including Firefox Browser Plugin
Posted by Hodge on Aug 2, 2008 in Featured, Linux, Ubuntu • 80 comments •

I wanted the latest version of Sun’s JRE installed on my system, and to have it set up as the default Java Runtime Environment whenever I ran a Java executable, or Jar file. It’s actually a pretty easy process, so this is a relatively short tutorial, but I’ll cover both the 32 bit and 64 bit installations, since aside from differences in file names, the set up is identical.
Changelog
Update 12/10/09: JRE 1.6.0 u16 now available!
Update 19/08/09: JRE 1.6.0 u15 now available!
Update 29/06/09: JRE 1.6.0 u14 now available!
Update 29/03/09: JRE 1.6.0 u13 now available!
Update 05/02/09: Updated for u12, which now includes the 64 bit Browser Plugin!
Installing JRE
First, decide on which architecture will be installed, and download the relevant file from the main Java website – if you’re running a 64 Bit Linux OS, download the 64 Bit JRE.
At the time of writing, 1.6.0 u16 can be downloaded from the following: 32 bit JRE, and 64 bit JRE. I wanted to install the x64 version, and so downloaded jre-6u16-linux-x64.bin to my Desktop. I also wanted to install it in its own directory in /opt, and so created a directory for it to sit in:
cd /opt
sudo mkdir java
I was also experimenting with the 32 and 64 bit versions, so made two extra directories within java:
cd java
sudo mkdir 32 64
I then moved the relevant file(s) to the respective directories, and made them executable:
32 bit:
sudo mv ~/Desktop/jre-6u16-linux-i586.bin /opt/java/32
sudo chmod 755 /opt/java/32/jre-6u16-linux-i586.bin
64 bit:
sudo mv ~/Desktop/jre-6u16-linux-x64.bin /opt/java/64
sudo chmod 755 /opt/java/64/jre-6u16-linux-x64.bin
The final part of the installation simply involves executing the binary file:
32 bit:
cd /opt/java/32
sudo ./jre-6u16-linux-i586.bin
64 bit:
cd /opt/java/64
sudo ./jre-6u16-linux-x64.bin
Regardless of architecture, this should create a sub directory called jre1.6.0_16.
Setting JRE 1.6.0 u16 as Default
The process simply involves telling the system that there is an alternative Java binary available, and to use this binary to execute an “java” commands:
32 bit:
sudo update-alternatives --install "/usr/bin/java" "java" "/opt/java/32/jre1.6.0_16/bin/java" 1
sudo update-alternatives --set java /opt/java/32/jre1.6.0_16/bin/java
64 bit:
sudo update-alternatives --install "/usr/bin/java" "java" "/opt/java/64/jre1.6.0_16/bin/java" 1
sudo update-alternatives --set java /opt/java/64/jre1.6.0_16/bin/java
Follwing the second command, there should be output to the terminal something along the lines of:
Using '/opt/java/32/jre1.6.0_16/bin/java' to provide 'java'.
or,
Using '/opt/java/64/jre1.6.0_16/bin/java' to provide 'java'.
depending on the architecture installed.
To double check everything is as it should be, in a Terminal run:
java -version
This should output something along the lines of:
java version "1.6.0_xx"
Java(TM) SE Runtime Environment (build 1.6.0_xx)
Java HotSpot(TM) 64-Bit Server VM (build xxxx, mixed mode)
That’s it. Now every time “java” is run, either explicitly from the Terminal, or via a Java executable (such as the Eclipse IDE), the newly installed /opt/java/64/jre1.6.0_16/bin/java binary will be used as opposed to the binary installed by default. Simple, eh?
Installing the Browser Plugin
Note: For the 64 bit plugin, it is strongly recommended that you use the version of Firefox available for installation via your distribution’s repositories.
As with most Firefox plugins, they can be installed in ~/.mozilla/plugins – if it doesn’t exist, it can be created:
mkdir ~/.mozilla/plugins
It may also be necessary to uninstall any previous Java installations, such as IcedTea etc.:
sudo apt-get remove icedtea-gcjwebplugin
Note: if you’re upgrading from a previous JRE install, remove the old plugin first:
32 Bit:
rm ~/.mozilla/plugins/libjavaplugin_oji.so
64 Bit:
rm ~/.mozilla/plugins/libnpjp2.so
The Plugin can now be installed by either copying the file:
32 Bit:
cp /opt/java/32/jre1.6.0_16/plugin/i386/ns7/libjavaplugin_oji.so ~/.mozilla/plugins/
64 Bit:
cp /opt/java/64/jre1.6.0_16/lib/amd64/libnpjp2.so ~/.mozilla/plugins/
or by creating a symbolic link to the file (this is the best option)
32 Bit:
ln -s /opt/java/32/jre1.6.0_16/plugin/i386/ns7/libjavaplugin_oji.so ~/.mozilla/plugins/
64 Bit:
ln -s /opt/java/64/jre1.6.0_16/lib/amd64/libnpjp2.so ~/.mozilla/plugins/
Once installed, restart Firefox. There are two methods to see if the Plugin is installed – navigate to about:plugins
or to the Java Tester Page
That’s it. Enjoy ![]()
Something not quite right? Inaccuracies or invalid code? Didn’t work for you? Don’t like me using Ss instead of Zs? Add a comment below! All comments are welcome. Except spam, because spam is a bit crap.
|
|
Lot 6 New HP G60 15.6 Laptop Notebook Win 7 HDMI Webcam $3,149.95 |
|
|
Lenovo ThinkPad X201s 5397FFU 5397-FFU Notebook/Laptop $2,646.40 |
|
|
Lenovo ThinkPad X201s 5413FFU 5413-FFU Notebook/Laptop $2,636.88 |
|
|
New Lenovo ThinkPad W510 43192RU Laptop Notebook $2,494.99 |
|
|
Lenovo ThinkPad X200s 7469-5GU 74695GU Notebook/Laptop $2,385.48 |
No related posts.
Related posts brought to you by Yet Another Related Posts Plugin.








[...] Update Java Filed under: Linux — 0ddn1x @ 2008-08-05 20:03:18 +0000 http://www.64bitjungle.com/ubuntu/install-java-jre-160-update-x-on-hardy-as-the-default-java-runtime... [...]
Nice, thanks! Any tips about getting the 64 bit java working with firefox?
Hi Bakunin,
Thanks – glad it helped. Unfortunately, there isn’t a plugin as yet for 64 Bit JRE (or JDK) – hopefully, one will be available soon, since I’d like to use it too
I’ll update the tutorial as soon as one becomes available
i did the installation and evericing was write… no problems there, but now when i type java -version i received this mensage Command ‘java’ is available in ‘/usr/bin/java’
bash: java: command not found
i tried to test the java version on the sun site and give error no java found
what may be the problem…. i haven’t no error in the installation…
please help…
I cannot get this update to work, period. Nothing works. I get the .bin in a folder then it won’t let me copy into the /usr/bin/jvm folder so I went to command line from the GRUB and copied it manually. Still won’t install. Won’t even recognize it as an alternative and now I can’t delete it without going back into the command line from the GRUB. For that matter, System says it cannot find the alternative no matter where I put it or how I put it there. WTF? All I get is cannot stat jre1.6.0_07 not found. It’s in there so many damn times I can’t get it out of some of the directories. Also says command not found sometimes and I’ve tried it on multiple directories where I have put jre-1.6.0_07. I’m about to scrap Ubuntu if I can’t get this loaded. I need it to access my work files.
ZEUS – did you get any error messages when you ran the sudo update-alternatives –install… command? It sounds like you may have run the .bin file ok, but it probably hasn’t installed correctly with update-alternatives. Try running the commands again, and if there are any error messages post them here and I’ll see if I can help further.
Levi – Don’t install via GRUB – very bad idea
You have to do it via the terminal once Ubuntu has booted up (Applications -> Accessories -> Terminal). It sounds like it could be permissions – are you copying the file with “sudo”? Assuming you have the 64bit version:
sudo cp jre-6u7-linux-x64.bin /usr/bin/jvm
Although I would recommend creating the folder either in /usr/java
sudo mkdir /usr/java
Or in /opt
sudo mkdir /opt/java
Then, copy the .bin file from your download directory to the new dir – again, using sudo, which gives you the correct admin permissions to copy the file:
sudo cp jre-6u7-linux-x64.bin /usr/java
Once it has copied, go to the directory and make the file executable:
cd /usr/java
sudo chmod 755 jre-6u7-linux-x64.bin
Then run the file:
sudo ./jre-6u7-linux-x64.bin
This will create a directory called “jre1.6.0_07″ so the full path to it will be:
/usr/java/jre1.6.0_07
Once you have this directory, you can run:
sudo update-alternatives –install “/usr/bin/java” “java” “/usr/java/jre1.6.0_07/bin/java” 1
(All one command!) followed by:
sudo update-alternatives –set java /usr/java/jre1.6.0_07/bin/java
Remember to use “sudo” before each command – this will give you the correct permissions to copy and run everything.
If you have any more problems please post them here, and I’ll see if I can help further.
Please Help
sudo ./jre-6u7-linux-x64.bin
agreement…
yes
Unpacking…
Checksumming…
Extracting…
./jdk-6u7-linux-x64.bin: line 480: ./install.sfx.13618: cannot execute binary file
Failed to extract the files. Please refer to the Troubleshooting section of
the Installation Instructions on the download page for more information.
paatap@paatap-server:/usr/java/64>
Paatap – it looks like it could be a corrupt archive. Have you tried downloading the file again? Hopefully grabbing a new copy will solve the problem
i traied same file on fedora 8 x 64 -no problem
is this problem of suse?
Thank you. This java update has been very annoying to update. I finally got it to work though. I appreciate the help. The open source community will destroy windows foundation as a licensed operating system. I can now do everything I need in linux from Pro audio to video editing, office programs, font creators, graphic design. This is great. I’ll be donating some money to the programmers ASAP. The open source philosophy is the only good philosophy whether you are talking about software or business transactions. Anything that promotes a win/win environment is beneficial for the whole planet. I hope this philosophy can offer politicians a real way to fix the health care systems as well as help capitalistic vampires like MBNA write a bankruptcy law that doesn’t screw over the middle class and the impoverished. One can only hope for the best and prepare for the worst. Thanks again.
Great article, some apps ( ie Tomcat ) seem to still need a JAVA_HOME defined. This should be ( using the paths above and the 32 bit version ) :
export JAVA_HOME=/opt/java/32/jre1.6.0_07/
using Kubuntu 8.04 here.
I had the same thing where no matter what i did or told it which java to use it still wasn’t playing. I did manage to figure out how to get it to work.
no matter what i fed it to tell it which java to use whenever i gave it a “which java” it pointed to /usr/bin/java. for safeties sake i renamed this file to /usr/bin/java.old just in case this went wrong and i had to revert.
Then created a symbolic link from the new java to where the old one was.
so
ln -s /opt/java/blah/blah/where/you/installed/it/bin/java /usr/bin/java.
and finally it worked. found absolutely jack on the web about how to do this so hope it saves some other sucker five minutes
[...] If you’d like to set up 64 Bit (or 32 Bit) JRE to run Eclipse, follow these instructions. [...]
[...] with 64 Bit, I’m keeping this post separate from my main HowTo on installing JRE: Install Java JRE 1.6.0 (Update x) on Hardy as the Default Java Runtime, which will be updated to include the new information when JRE6 u12 Final is released – hopefully [...]
I’ve done this install before but for some reason now when I do ./jre-6u12-linux-64.bin I’m getting:
Unpacking…
Checksumming…
Extracting…
./install.sfx.15713: 1: ELF: not found
./install.sfx.15713: 2: Syntax error: “)” unexpected
Failed to extract the files. Please refer to the Troubleshooting section of
the Installation Instructions on the download page for more information.
Anyone have any ideas?
Thanks, this worked.
Thanks a lot! This description is very helpful!
I have a problem. The JRE 1.6.0 u12 install was sucsess and if I write in terminal java -version, I get java version “1.6.0_12″ message. This is OK. I am happy.
But the browser plugin install wasn’t sucsess. I copied the libnpjp2.so file (because I have 64 bit system) from /opt/java/64/jre1.6.0_12/lib/amd64/ directory to ~/.mozilla/plugins/ directory. I restarted the firefox browser. When tested it (in this page, the browser closed. Why? What is the wrong step?
Hi Quintipor,
What does the about:plugins page report when you open it in your browser? If it’s not libnpjp2.so, ensure you uninstall the version it’s reporting, for example for IcedTea, run:
sudo apt-get remove icedtea6-plugin icedtea-gcjwebplugin
Also, what system/browser are you running? I hope we can fix this for you!
Hi Hodge!
If I copy the libnpjp2.so to the plugins directory and restart my firefox 3.0.3 browser the result of about:plugins this. Before I isntall this plugin I uninstalled the icedtea-gcjwebplugin.
My laptop is HP-Compaq 6720s with 64 bit CPU (Intel T7250) and the OS is Ubuntu 8.04 Hardy Heron. The browser is Mozilla Firefox 3.0.6. If you want to know more information about my system I can give it!
Thanks the help!
Hi Quintipor,
What ownership/permissions are set on the libnpjp2.so? Did you copy the file using sudo?
run:
cd ~/.mozilla/plugins/
ls -l
I wonder if it could be a permissions problem?
I tried copy with root permission, too, but the result is same.
quintipor@quintipor-laptop:~/.mozilla/plugins$ ls -l
total 9400
-rwxr-xr-x 1 quintipor quintipor 9526312 2008-12-10 18:13 libflashplayer.so
-rwxr-xr-x 1 root root 77367 2009-01-17 10:37 libnpjp2.so
Another result of tried:
quintipor@quintipor-laptop:~/.mozilla/plugins$ ls -l
total 9400
-rwxr-xr-x 1 quintipor quintipor 9526312 2008-12-10 18:13 libflashplayer.so
-rwxr-xr-x 1 quintipor quintipor 77367 2009-01-17 10:37 libnpjp2.so
Finally the plugin install sucsess. I don’t why.
I remove evrething and install again and now the test result is a ping rectangle with Java Version: 1.6.0_12 from Sun Microsystems Inc
The about:plugins this
And the ownership/permissions are:
quintipor@quintipor-laptop:~$ ls -l ~/.mozilla/plugins/
total 9320
-rwxr-xr-x 1 quintipor quintipor 9526312 2008-12-10 18:13 libflashplayer.so
lrwxrwxrwx 1 quintipor quintipor 46 2009-03-03 09:19 libnpjp2.so -> /opt/java/64/jre1.6.0_12/lib/amd64/libnpjp2.so
Thank you Hodge your help!
Firefox crashes for me everytime I load a webpage with Java. I installed exactly the way you wrote. I have Firefox 3.0.7.
It’s solved.
Hey it is nice guide it worked for me thank you very much
I have been using Ubuntu 8.10 x86_64 on Dell inspiron E1705, everything has been working for me even Java compiler. However, I never got my firefox (3.0.7) to work properly with icedtea java plug-ins. Some applets did work in some what ways and that was it.
One of the sites that I visit regularly (www.logmein.com), I never got it working with firefox on Ubuntu 8.10 x86_64. Ubuntu 8.10 but Ubuntu x86 java plugins does work.
Anyway, long story short, I have followed your instruction as is, now firefox plug-ins for Java is working. I have just tested it by going to http://www.logmein.com; it works!!!
Thank you very much.
Regards,
Habib Rahman
Thank you for a great HOWTO. Seems to have worked perfectly. Although the second test page causes firefox to close immediately without error, as does java.com/en/download/help/testvm.xml
Hi Insane_Homer – try running Firefox from the command line, then when it crashes, it should give you some output in the Terminal, which may be a starting point to finding the cause of the problem. Post the error, and I’ll see if I can help
Hi,
I am not able to get the java plugin work for my firefox browser…I have installed everything according to the above procedure…When click on the test page the browser crashes…i tried changing the permissions of the ~/.mozilla/plugins/libnpjp2.so file also..still the browser crashes…please help me out..
total 80
-rwxrwxrwx 1 aditya aditya 77367 2009-04-10 23:42 libnpjp2.so
This worked perfectly for me until yesterday when some new Ubuntu updates were installed on my machine. I’m trying to use Eclipse IDE as per one of your other posts, but now it just hangs on start up saying ‘Initialising Java Tooling 0%’
Hi Tom,
Do you have any other Java runtimes installed? Perhaps Ubuntu reset the default environment to another runtime during the update – I know Eclipse can have problems running on any other flavour of Java other than this JRE. Try running the update-alternatives commands again, just in case:
sudo update-alternatives –install “/usr/bin/java” “java” “/opt/java/64/jre1.6.0_13/bin/java” 1
sudo update-alternatives –set java /opt/java/64/jre1.6.0_13/bin/java
It might also be worth poking through the Eclipse error log to see if that points in any direction worth exploring.
Hope that helps
AWESOME. Thanks for the idiot-proof tutorial.
Hi man
Thanks for this kick-ass HowTo. I was looking for this a long time.
I installed and set up the jdk1.6.0_14 cause this is the current version. My java apps work but I have problems with Firefox. I read all the comments and some people encountered the same problem. When I go to the page with the java-tester the browser crashes. Here is the error message:
Didn’t find JVM under /home/andreas/.mozilla/plugins
firefox-bin: ../../../../src/plugin/solaris/plugin2/common/JavaVM.c:104: InitializeJVM: Assertion `foundJVM’ failed.
Aborted
I have copied the plug-in to the correct location. What is wrong?
I did really like your post… Also can you suggest me any business hosting company for corporate website?
Hey, I tried your steps, but haven’t got the damn stuff to work.
I can’t see the plugin when I do about:plugins. And of course Java doesn’t work.
I tried loading Firefox through the command prompt and got the following error:
“LoadPlugin: failed to initialize shared library /opt/jre1.6.0_13/lib/amd64/libnpjp2.so [/opt/jre1.6.0_13/lib/amd64/libnpjp2.so: wrong ELF class: ELFCLASS64]”
The path is different that the one you used, but yeah that’s it.
I have Ubuntu Hardy 64 bit and 64 bit Firefox too.
Please help!
Hi Levi,
It seems a few people have been getting the same error – basically, it seems you need to install the Firefox from your distribution’s repositories, as opposed to downloading and installing from the Mozilla website etc.
Hope that helps
About the issue with a crashing FF, here is what helped me:
http://ubuntuforums.org/showpost.php?p=6791349&postcount=59
upd: well, firstly it helped, but after a FF restart it crashes on java applets again
Hi seventeener
Your tip worked for me!
I created the link and edited the Firefox config after that. I found out that it only works like this:
[code]
java.default_java_location_others = /path_to_jre/jre1.6.0_12
java.java_plugin_library_name = libnpjp2
[/code]
There is another HowTo that says
[code]
java.default_java_location_others = /path_to_jre/jre1.6.0_12
java.java_plugin_library_name = libnpjp2.so
[/code]
If you name it libnpjp.so it does not work. Don’t ask me why.
Hello,
I’m on a 32-bit machine, but was wondering if you could help.
I’m trying to install java 6 update 13 on Ubuntu 9.04. I followed your instructions to use sudo, etc., but when I execute I get the error “./jre-6u13-linux-i586.bin: 363: ./install.sfx.9230: not found”. I’ve tried downloading the archive several times, so I don’t think it could be a corrupt archive, unless Sun is serving one.
Any ideas? Thanks much!
I wonder why it is such a drag to install something as simple as JAVA on Linux. Ubuntu 9 really gave me a headache.
But eventually, after deciding that the Sun guide on installing Java is rubbish, and following this amazing guide I got it to work, but…
How do I un-install the ICETea plugin? The command in the above guide tells me it isnt installed, but FireFox is convinced it is.
And any good guides like this on installing JDK with the NetBeans IDE?
Many thanks for this step by step install tutorial. Definitely a bookmark to save.
The icedTea plugin did not work so I uninstalled it (and related stuff in the list) with Synaptec Manager (verified by using the apt-get command above)
>uname -a
Linux linux 2.6.27-11-generic #1 SMP Wed Apr 1 20:53:41 UTC 2009 x86_64 GNU/Linux
>cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=8.10
DISTRIB_CODENAME=intrepid
DISTRIB_DESCRIPTION=”Ubuntu 8.10″
I had to change the paths, since I ran the bin command ( sudo ./jre…bin) in /usr/lib, where my previous version jre was located.
Rose
[...] post was based from this: http://www.64bitjungle.com/ubuntu/install-java-jre-160-update-x-on-hardy-as-the-default-java-runtime If you like this post and would like to receive updates from this blog, please subscribe our [...]
Thanks. Great tutorial
Great, thanks! Easy tutorial and last but not least: it WORKED for me…
Thank you!
This was a great tutorial. Simple, straight-forward, and complete. It worked perfectly. Now, if only there was a way to get my system to recognize the latest JDK…
Finally!!! I’ve been all over the net, or so it seems, trying to find out how to get this to work. I’m using Ubuntu 8.10 Intrepid AMD64. I installed a download manager, FreeRapidDownload a few days ago, but when I tried to run it, it came back and told me to forget about it because it wasn’t going to run with the buggy Java 1.6.0_0 on my system!
Last night I went to Sun and downloaded the 64 bit version and installed it, but of course without instructions, this didn’t get me anywhere. Earlier, I had removed the two Java packages I found in Synaptic, but apparently that wasn’t enough because the old version was still working on my system.
These were the commands (my versions) that should have been at all the sites I visited!!
sudo update-alternatives –install “/usr/bin/java” “java” “/usr/java/jre1.6.0_14/bin/java” 1
sudo update-alternatives –set java /usr/java/jre1.6.0_14/bin/java
Your other commands for the sym links and for what and how to remove IceTea also were key to success. I’ll remind others that you must shut down and restart the browser, FF, to see if IcedTea is gone from About:Plugins. I had to do it a couple of times.
This is more important to me than just enabling me to check out a new download manager. I’m currently looking into setting up a backup system, and I just found a promising program to use, Areca, but it’s Java based. I didn’t feel safe using it with the “buggy” version of Java I had, but now I have no excuse not to forge ahead and begin playing it safe with a proper backup program.
THANK YOU!!!! What a find!!
Could add the plugin to update-alternatives using –slave so when you do
sudo update-alternatives –config java
the plugin will be updated as well.
I have this cuestion. Im trying to update the virtual machine in my ubuntu computer, so i did, i download the 1.6.0_145 version but i dont know how to firefox 3.0.11 get the same update. When i enter to this site http://www.javatester.org/version.html, results that the version i have is 1.0.6_0 … how can i update firefox too?
when i enter in my terminal in ubuntu:
$ java -version
this is the output:
java version “1.6.0_14″
Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
Java HotSpot(TM) Client VM (build 14.0-b16, mixed mode, sharing)
can someone help me please??
thanks
a 5 is extra in the version i try to write sorry…
1.6.0_14 this is the latest one i think
Hi Emesto,
You’ll need to first delete the old plugin from your Firefox plugins directory:
For 32 Bit:
rm ~/.mozilla/plugins/libjavaplugin_oji.soFor 64 Bit:
rm ~/.mozilla/plugins/libnpjp2.soThen copy the new plugin file:
for 32 bit (Check where you have installed it for the directory path)
cp /opt/java/32/jre1.6.0_14/plugin/i386/ns7/libjavaplugin_oji.so ~/.mozilla/pluginsFor 64 Bit:
cp /opt/java/64/jre1.6.0_14/lib/amd64/libnpjp2.so ~/.mozilla/pluginsRemember to restard Firefox too. I hope that helps
jre for 32 bit and 64 bit system
Better!
sudo ln -s /opt/java/64/lib/amd64/libnpjp2.so /usr/lib/mozilla/plugins/
It worked fine till i execute thwese two commands,
sudo update-alternatives –install “/usr/bin/java” “java” “/opt/java/64/jre1.6.0_13/bin/java” 1
sudo update-alternatives –set java /opt/java/64/jre1.6.0_13/bin/java
No errors and i didn’t see any output on the screen either. Java -version gimme the same old java 1.5
what went wrong any guess??
Regards,
Anandh
I tried this on Ubuntu 9.04 and JDK 1.6 update 14
It worked without any issues and my 64 bit JRE is up and running along with firefox plugin and Eclipse IDE.
Thanks a ton for posting these steps. One of the best I have seen
I seem to have the same problem as Anandh (July 16). Running:
sudo update-alternatives –install “/usr/bin/java” “java” “/opt/java/64/jre1.6.0_13/bin/java” 1
seems to go OK and returns to the prompt.
Then, when I run
sudo update-alternatives –set java /opt/java/64/jre1.6.0_13/bin/java
I get an error message “update-alternatives: Vaihtoehtoa “/opt/java/64/jrel.6.0_14/bin/java” ei löydy.” meaning that the option “/opt/java/…” is not found.
Commanding sudo update-alternatives –config java gives me:
There are 4 alternatives which provide `java’.
Selection Alternative
———————————————–
*+ 1 /usr/lib/jvm/java-6-openjdk/jre/bin/java
2 /usr/lib/jvm/java-gcj/jre/bin/java
3 /usr/bin/gij-4.2
4 /usr/lib/jvm/java-6-sun/jre/bin/java
When I look in the directory /opt/java/64/jre1.6.0_13/bin/ I can see the green java file, there. (Sorry that I call it ‘green’. I don’t really know what it stands for and if its right or not).
Any ideas, anyone, please?
just a tip for firefox 3.5 users :
i followed the instructions verbatim and everything worked up until the browser plugin check….
i had my version of ff 3.5 installed in /home/me/firefox which is where i had to install it so ubuntu didnt default back to 3.0.xx. for some reason, even though i had the jre1.6.0_15 file linked to my /home/me/firefox/plugins, it was not recognizing it. i had to link that file to /usr/lib/firefox/plugins and it picked it up. otherwise everything went great. kudos to Hodge for such a detailed guide. i finally got java 1.6.0_15 working with ff 3.5!
P.S. i forgot to add that you must “sudo su” and “rm /usr/lib/firefox/plugins/flashplugin-alternative.so” before starting
in order to remove the plugin it is using (this was my case at least) hope this helps.
Thanks! It worked beautifully! How come this specific info is NOT under the installation instructions on Sun’s site?
Thanks, I’ve done all these, it seemed to went fine, but Firefox 3.5 doesn’t get it. Jason wrote something like this in one of the comments:
“i had my version of ff 3.5 installed in /home/me/firefox which is where i had to install it so ubuntu didnt default back to 3.0.xx. for some reason, even though i had the jre1.6.0_15 file linked to my /home/me/firefox/plugins, it was not recognizing it. i had to link that file to /usr/lib/firefox/plugins and it picked it up.”
This might be useful for the non-idiots, but the newbies like me need to copypaste everything to the terminal, otherwise I’ll never figure out what to do. Somebody please help!
Hodge script works well. Thanks. There are more current snapshots at http://download.java.net/jdk6/, which seem to work though you have to take care to use the names of these builds and edit the script accordingly.
Please someone tell me how can I remove this? Doesn’t work with the ubuntuzilla firefox (I can’t seem to uninstall that either, only the ubuntuzilla program itself). I start to hate Ubuntu to be honest. Why do I need to be a hacker to make these basic things to work?
hey, you are genius. this the first time i ever succed installing java update since i used ubuntu desktop before 4 years.
realy thanks for the simple elegent and informative post
nebim
hey, you are genius. this the first time i ever succeed installing java update since i used ubuntu desktop before 4 years.
really thanks for the simple elegant and informative post
nebim
ONE THING IS MISSING…you NEED to create another ln -s link to the /usr/lib64/mozilla/plugins to get it work!
Hi,
Actually you only need to create the ln -s link to the /usr/lib64/mozilla/plugins if you want the plugin to be used system wide. If you’re the only user on the system, or you don’t want the changes system wide, creating the link to your home directory will suffice.
No way to let firefox 3.5.6 recognize the java plugin.
I am on ubuntu 9.10 64 bit .
Java works fine but firefox do not find the plugins…. I think 3.5.6 is the worst release ever …. also fonts are decreased …
Any suggestion?
Andrea
[...] Install Java JRE 1.6.0 (Update x) in Linux as the Default Java Runtime, including Firefox Browser Pl… (tags: linux debian ubuntu java sysadmin) Categories: Microblog Comments (0) Trackbacks (0) Leave a comment Trackback [...]
When I tested it using tester page after following all the steps detailed above , the browser closed if I use copy option for mozilla plugin but if I use link option ,it worked perfectly .
Hi,
A video from YouTube on how to install Java 6 on Ubuntu here.
Sunil.
Thank you for your precious and so clear help! After many crashes with other methods, eventually this time I succeeded installing Java 64 on my Ubuntu 9.10 64 with Firefox 3.6.
And it works!
For java installation on Fedora Linux, you can check this post
[...] I have found this article by another search: http://www.64bitjungle.com/ubuntu/install-java-jre-160-update-x-on-hardy-as-the-default-java-runtime... [...]
[...] en savoir plus sur l’utilisation & renseillement: Cliquer ici VERSION ENGLISH: Click here var a2a_config = a2a_config || {}; a2a_localize = { Share: "Partager", Save: "Enregistrer", [...]
sudo apt-get install ia32-libs
sudo apt-get install lib32nss-mdns
and try again installing jdk