HOW TO: Install Sun JRE Java on Linux Mint (script included)

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
grizzler

Re: HOW TO: Install Sun JRE Java on Linux Mint (script inclu

Post by grizzler »

sagirfahmid3 wrote:^^ I didn't want to use root status when deleting files from the home folder; I thought it would be unnecessary, but ok, I'll put a "sudo" before the rm -rf.
It shouldn't be necessary, but in this particular case it seems it is.
grizzler

Re: HOW TO: Install Sun JRE Java on Linux Mint (script inclu

Post by grizzler »

SimonJ wrote:I changed the ownership of these directories to simion and created a new symlink but java still doesn't work in Firefox..
Odd. No error when you created the link? Then this should really be enough to get things working.
sagirfahmid3

Re: HOW TO: Install Sun JRE Java on Linux Mint (script inclu

Post by sagirfahmid3 »

sudo chmod 777 -R ~/.mozilla and be done with it...sheesh..
SimonJ

Re: HOW TO: Install Sun JRE Java on Linux Mint (script inclu

Post by SimonJ »

It still doesnt work.. What do you think the problem might be? I followed all of your proposed steps.
grizzler

Re: HOW TO: Install Sun JRE Java on Linux Mint (script inclu

Post by grizzler »

Could (remnants of) a previously installed Java plugin be interfering? What kind of Java installation did you have before (if any)?

Do any of the following terminal commands produce any output?

Code: Select all

locate javaplugin
update-alternatives --query firefox-javaplugin.so
update-alternatives --query mozilla-javaplugin.so
SimonJ

Re: HOW TO: Install Sun JRE Java on Linux Mint (script inclu

Post by SimonJ »

I guess I had the OpenJDK from the package that comes with the package manager. I had a problem with an applet and on a desktop Im running this java plugin and the applet works so thats why I'm trying to install it here. This is the output I get when running youre commands:

Code: Select all

simon@simon-HP-630-Notebook-PC ~ $ locate javaplugin
/opt/java/64/jre1.7.0_05/lib/i386/libjavaplugin_jni.so
/opt/java/64/jre1.7.0_05/lib/i386/libjavaplugin_nscp.so
/opt/java/64/jre1.7.0_05/lib/i386/libjavaplugin_nscp_gcc29.so
/opt/java/64/jre1.7.0_05/lib/i386/libjavaplugin_oji.so
/opt/java/64/jre1.7.0_05/plugin/i386/ns7/libjavaplugin_oji.so
/usr/lib/ure/lib/sunjavaplugin.so
simon@simon-HP-630-Notebook-PC ~ $ 
simon@simon-HP-630-Notebook-PC ~ $ update-alternatives --query firefox-javaplugin.so
update-alternatives: error: no alternatives for firefox-javaplugin.so.
simon@simon-HP-630-Notebook-PC ~ $ 
simon@simon-HP-630-Notebook-PC ~ $ update-alternatives --query mozilla-javaplugin.so
update-alternatives: error: no alternatives for mozilla-javaplugin.so.
simon@simon-HP-630-Notebook-PC ~ $ 
Thanks!
Simon
grizzler

Re: HOW TO: Install Sun JRE Java on Linux Mint (script inclu

Post by grizzler »

There's definitely something odd here:

Code: Select all

/opt/java/64/jre1.7.0_05/lib/i386/libjavaplugin_jni.so
...etc.
That looks like a 32 bit Java in a 64 bit location. Does the symlink in ~/.mozilla/plugins actually exist? What does it point to?

I think you would probably be better off if you deleted the whole /opt/java/64 structure, downloaded a new tarball (make sure it's the 64 bit one!), removed the symlink in ~/.mozilla/plugins (never mind, the script should do that, I think) and ran the script again.
SimonJ

Re: HOW TO: Install Sun JRE Java on Linux Mint (script inclu

Post by SimonJ »

Hello,

I did what you said and now it actually works!
Thanks alot!
Simon
sagirfahmid3

Re: HOW TO: Install Sun JRE Java on Linux Mint (script inclu

Post by sagirfahmid3 »

Excellent :P
User avatar
sdgengineer
Level 1
Level 1
Posts: 6
Joined: Wed Sep 14, 2011 9:52 pm
Location: STL, USA
Contact:

Re: HOW TO: Install Sun JRE Java on Linux Mint (script inclu

Post by sdgengineer »

Great explanation! :D

One tiny little thing. I am running Peppermint 1, and when I right click the tar.gz file and told it to "extract here" it did not. I needed to doubleclick it, and open up archive manager, and use it to extract. I think this is an issue with peppermint, not your instructions. I used leafpad to read the scrip file, and pretty much understood it (I know my way around a C: prompt, but need a cheat sheet to do common Linux commands)

Just wanted to thank you for your great tutorial/script

SDGengineer
SDG Engineer
sagirfahmid3

Re: HOW TO: Install Sun JRE Java on Linux Mint (script inclu

Post by sagirfahmid3 »

Thank you! I'm a beginner at BASH scripting really, but that script was of "okay" difficulty (just mv, rm, cp, and ln commands).
Also, Pjotr's tutorial was my inspiration for making it (and partly my laziness at manually installing Java at every update LOL :roll: ).
oobetimer

Re: HOW TO: Install Sun JRE Java on Linux Mint (script inclu

Post by oobetimer »

Oracle Java 7 is vulnerable. Java 6 is safer and OpenJDK Java is safe, because IcedTea plugin does not allow the malicious code.
http://forums.linuxmint.com/viewtopic.php?f=58&t=111226
Code execution was confirmed with the latest Oracle and IBM Java 7 web browser plugin. IcedTea-Web using OpenJDK7 blocks this exploit by not allowing applet to change the SecurityManager (which is allowed in Oracle and IBM Java plugin).

Java 6 is currently not known to be affected.
https://bugzilla.redhat.com/show_bug.cg ... &id=852051

Edit 1.9.2012

Oracle has fixed the problem publishing Java 7u7 .. :D

Edit 3.9.2012

Fixed an still broken .. :(
https://www.infoworld.com/d/security/re ... ase-201472
August 31, 2012
Researchers find critical vulnerability in Java 7 patch hours after its release
Last edited by oobetimer on Mon Sep 03, 2012 9:57 am, edited 2 times in total.
sagirfahmid3

Re: HOW TO: Install Sun JRE Java on Linux Mint (script inclu

Post by sagirfahmid3 »

:shock: Downloading JRE 6 u 31 lol. Also gonna have to add a wee bit of bash code; I'll mark the codebox as "work in progress" for now and take the link off.
grizzler

Re: HOW TO: Install Sun JRE Java on Linux Mint (script inclu

Post by grizzler »

sagirfahmid3 wrote::shock: Downloading JRE 6 u 31
Are you sure that's a good idea? The most recent update of version 6 is 34.
sagirfahmid3

Re: HOW TO: Install Sun JRE Java on Linux Mint (script inclu

Post by sagirfahmid3 »

Sorry, that was the last one I remembered using lol, but no, I installed 6 u 34 :D
Post Reply

Return to “Tutorials”