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

Write tutorials here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Do not start a support topic here please. Before you post please read this

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

Postby sagirfahmid3 on Thu Jan 26, 2012 11:21 am

Ok, lets face it, Java is confusing as hell to install (especially for noobs, me included). Java's main website's instructions are crazy confusing as you can see: Clicky
What good is a web browser without Java? I tried to install Java manually from http://www.java.com but they unfortunately don't have a .deb package so you have to manually install it (which is rather hard). Following the instructions on Java's site exactly as they were written got me nowhere--my browser still wouldn't recognize Java. Luckily for us, this good man Pjotr has created a nice website called "Easy Linux Tips Project" hosted by sites.google.com that aims to solve a few problems and answer a few questions, Java being one of them.

Anyways, thought I'd share his page over here: http://sites.google.com/site/easylinuxtipsproject/
About the author of the site (Pjotr): http://sites.google.com/site/easylinuxtipsproject/about
And, this is the instructions by him that show how to install Java really fast: http://sites.google.com/site/easylinuxtipsproject/java

If you would like your Java installation to be automated, I've made a script to do that. It's on the second page, the 3rd post.
Please also note that sometimes, I need to make changes to the script (due to new updates from Java). If that happens, please follow Pjotr's tutorial while I finish changing the script.
Last edited by sagirfahmid3 on Sat Sep 01, 2012 11:31 am, edited 10 times in total.
User avatar
sagirfahmid3
Level 6
Level 6
 
Posts: 1054
Joined: Sun Sep 04, 2011 12:39 pm

Linux Mint is funded by ads and donations.
 

Re: HOW TO: Install Sun (Oracle) Java on Linux Mint 9

Postby xenopeek on Sat Jan 28, 2012 10:21 am

Off-topic feedback removed by moderator

Let's stay on topic please: how to install Oracle Java on Linux Mint 9 from the java.com website.

Suggestions for other version of Linux Mint? Suggestion for different ways of installing Oracle Java on Linux Mint 9 (not using the java.com website)? Please write a new how to.

Feedback (errors in the how to/improvement suggestions to the how to) are welcome here of course.
User avatar
xenopeek
Level 21
Level 21
 
Posts: 15280
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: HOW TO: Install Sun (Oracle) Java on Linux Mint 9

Postby trogger on Sat Jan 28, 2012 6:27 pm

Woo- Hoo!! And a very Big thank you.

Had been going quietly insane trying to get java running. This solved my problem.
Got this installation confirmation from the Java page http://www.java.com/en/download/install ... 22-generic :

Verified Java Version
Congratulations!
You have the recommended Java installed (Version 6 Update 30).

Have viewed several web pages requiring java successfully but get an error when I try to view this particular page: http://www.dailyfx.com/charts/netdaniachart/
[The page runs when I view it using Firefox on an XP computer]

Message I get says:
error. The application failed to run.
Last edited by trogger on Sun Jan 29, 2012 4:46 pm, edited 1 time in total.
trogger
Level 1
Level 1
 
Posts: 1
Joined: Sat Jan 28, 2012 5:35 pm

Re: HOW TO: Install Sun (Oracle) Java on Linux Mint 9

Postby Pjotr on Sat Jan 28, 2012 7:02 pm

@trogger: strange. I haven't yet encountered any websites that fail to function, when my easylinuxtipsproject how-to for Java had been applied.... Unfortunately I can't try it myself, because at this moment I have no system available with the very same Mint version as you.

What you might try is a test of the Duinsoft script, which possibly provides a deeper integration of Oracle (Sun) Java, than my manual: http://www.duinsoft.nl/packages.php?t=en

Please report your experience here: this is useful information.
Pjotr
Level 1
Level 1
 
Posts: 43
Joined: Mon Mar 07, 2011 10:18 am

Re: HOW TO: Install Sun (Oracle) Java on Linux Mint 9

Postby sagirfahmid3 on Sat Jan 28, 2012 7:07 pm

I have the exact same Java as you do (Java 6 Update 30), but it works for me :?
Did you do everything it said in the guide posted? Did you install the 32 bit or 64 bit version? (I am using 32 bit, as you can see from galternatives).
I don't think you can install the 64 bit version on a 32 bit computer (is your Mint 32 bit or 64 bit?), but if you did, get the 32 bit version installed instead.
Screenshot.png
Screenshot.png (246.99 KiB) Viewed 16033 times
Last edited by sagirfahmid3 on Sun Jan 29, 2012 10:37 am, edited 1 time in total.
User avatar
sagirfahmid3
Level 6
Level 6
 
Posts: 1054
Joined: Sun Sep 04, 2011 12:39 pm

Re: HOW TO: Install Sun (Oracle) Java on Linux Mint

Postby Pjotr on Sat Jan 28, 2012 7:16 pm

It could simply be a matter of patience; the dailyfx.com page takes some time to load. On older machines, with weak hardware, this may take even longer.

--edit:
I just added my name to my website, in order to avoid misunderstanding:
http://sites.google.com/site/easylinuxtipsproject/about
Pjotr
Level 1
Level 1
 
Posts: 43
Joined: Mon Mar 07, 2011 10:18 am

Re: HOW TO: Install Sun (Oracle) Java on Linux Mint

Postby ove on Sun Jan 29, 2012 5:15 am

Just before Christmas 2011 itstopped working due to some policy...
Iinstalled icedtea6 and then it worked for some days.
Linux Mint 9.

I need it to log in to my bank.
Firefox worked but it took a very long time to log in,that was Firefox 3.6.
Now there was an update to Firefox 9 - and now it crashes all the time.
I use USB with the original Mint 9 when I shall do this...

WHY NOT?
When this took place a month ago - why wasn't there an update through the Linux Mint update system?
When not,it makes the Mint somewhat "second class"...sorry to say...
ove
Level 1
Level 1
 
Posts: 5
Joined: Sat Dec 03, 2011 4:25 am

Re: HOW TO: Install Sun (Oracle) Java on Linux Mint

Postby ove on Sun Jan 29, 2012 6:32 am

The long guide here:

8. Execute the file, with the following command.
Type (copy/paste):
sudo ./jre-6u30-linux-x64.bin

Press Enter.

Now the license agreement might appear (nowadays probably no longer!). If it does appear: press the space bar as many times, until you see the following text:
Do you agree to the above license terms? [yes or no]

Type:
yes

Press Enter.


****
Sorry, but "no such command" when getting so far....
oops - I could do mkdirs...but alas the stupid system says I cannot rm what I mk'ed...

As perhapsthe leading Linux Desktop OS Mint should do a lot better than this - as for updating without a lot of work for people.
There was out-of-the-box when Mint 9 came, but now it is not so longer!
ove
Level 1
Level 1
 
Posts: 5
Joined: Sat Dec 03, 2011 4:25 am

Re: HOW TO: Install Sun (Oracle) Java on Linux Mint

Postby sagirfahmid3 on Sun Jan 29, 2012 10:33 am

PLEASE DON'T DOUBLE POST! :idea:
ove wrote:Sorry, but "no such command" when getting so far....
oops - I could do mkdirs...but alas the stupid system says I cannot rm what I mk'ed...

You forgot one of these steps in between:
3. Go to the new folder, with the following command.
Type (copy/paste):
cd java
Press Enter.
4. Create a new subfolder, with the following command.
Type (copy/paste):
sudo mkdir 32
Press Enter.
5. Move the JRE file that you just downloaded, into this newest folder, with the following command.
Type (copy/paste):
sudo mv ~/Downloads/jre-6u30-linux-i586.bin /opt/java/32
Press Enter.
6. Make the file executable, with the following command.
Type (copy/paste):
sudo chmod 755 /opt/java/32/jre-6u30-linux-i586.bin
Press Enter.
Now you're going to install JRE, by executing this file.
7. First, go to the new folder, with the following command.
Type (copy/paste):
cd /opt/java/32
Press Enter.
8. Execute the file, with the following command.
Type (copy/paste):
sudo ./jre-6u30-linux-i586.bin
Press Enter.
User avatar
sagirfahmid3
Level 6
Level 6
 
Posts: 1054
Joined: Sun Sep 04, 2011 12:39 pm

Re: HOW TO: Install Sun (Oracle) Java on Linux Mint

Postby upallnightmint on Tue Jan 31, 2012 10:47 pm

Easy Easy Easy. If your not happy like me running the older yet functional java version 6 update 26? 1.) google and go to the sun java website and download the current version (java 6 version 30). About 21.7mb. Then, extract the file. That will create the folder "jre1.0.6.30". Now, to be organized, you want to open a terminal and move (mv) "jre.1.0.6.30" to folder(directory), "/usr/lib". Now link your fancy new java software to multi-web browsers. File Browse to the location /usr/bin/firefox/plugins. Keep that open while opening another file browser to your new java install directory i.e., "/usr/lib/jre1.0.6.30/lib/i386/" scroll down and find file named "libnpjp2.so". Just locate it for now. Open a terminal(be root user enter"sudo su" and enter"password"), change directory "cd" to usr/lib/firefox/plugins. Once there, type "ln -s". ("thats "ln" space "-s"). Now, drag n drop file, 'libnpjp2.so' into terminal. This will create a symbiotic link for firefox and other web browsers to enact java. If this does not work, add another symbiotic link inside the folder /usr/lib/firefox-addons/plugins.
upallnightmint
Level 1
Level 1
 
Posts: 3
Joined: Tue Jan 31, 2012 9:06 pm

Re: HOW TO: Install Sun (Oracle) Java on Linux Mint

Postby Pjotr on Wed Feb 01, 2012 6:03 pm

upallnightmint wrote:If your not happy like me running the older yet functional java version 6 update 26?


Very unwise to continue with 6u26. Functional, yes of course. But insecure as hell. There are exploits of those insecurities "in the wild".

Do the right thing and upgrade. Then you can be happy with good reason.
Pjotr
Level 1
Level 1
 
Posts: 43
Joined: Mon Mar 07, 2011 10:18 am

Re: HOW TO: Install Sun (Oracle) Java on Linux Mint

Postby na1 on Mon Feb 13, 2012 2:24 pm

i am running
Code: Select all
nondescript plugins # uname -a
Linux nondescript 2.6.35-22-generic #33-Ubuntu SMP Sun Sep 19 20:32:27 UTC 2010 x86_64 GNU/Linux


I followed all of the instructions for the 64 bit install

this is the contents of my plugins folder

Code: Select all
nondescript plugins # ls
libnpjp2.so


Yet when I run the browser test at http://java.com/en/download/installed.jsp it tells me that I need to install java. I'm at a loss.
na1
Level 1
Level 1
 
Posts: 14
Joined: Fri Feb 10, 2012 1:40 pm

Re: HOW TO: Install Sun (Oracle) Java on Linux Mint

Postby sagirfahmid3 on Mon Feb 13, 2012 4:04 pm

The plugins folder for Firefox is located at /home/{user}/.mozilla/firefox/plugins/
If it, the folder, doesn't exist, create one. Then, make the symlink to the manually installed Java. (I had your problem too, on my laptop).
Also, don't forget to remove your current Java's plugin (if it exists).

Try following the instructions again.
User avatar
sagirfahmid3
Level 6
Level 6
 
Posts: 1054
Joined: Sun Sep 04, 2011 12:39 pm

Re: HOW TO: Install Sun (Oracle) Java on Linux Mint

Postby Pjotr on Wed Feb 15, 2012 2:18 pm

Yesterday, Oracle has issued an important security update for Java: 6u31.

I've already adapted the how-to on my website for this:
http://sites.google.com/site/easylinuxtipsproject/java

The Duinsoft repository has not yet been updated by it's maintainer, but will also be updated soon (the maintainer of the Duinsoft repo and I, work together).
Pjotr
Level 1
Level 1
 
Posts: 43
Joined: Mon Mar 07, 2011 10:18 am

Re: HOWTO: Install Oracle Java automatically and easily

Postby grizzler on Wed Feb 15, 2012 5:29 pm

A suddenly very unreliable internet connection makes uploading stuff less then fun, but it looks like everything is in place now.

@Vincent,
For the record, the link in Pjotr's posting points to the origin of the information provided in that other HowTo. That thread is now incomplete.
grizzler
Level 4
Level 4
 
Posts: 463
Joined: Wed Jun 15, 2011 5:19 pm
Location: The Hague, NL

Re: HOWTO: Install Oracle Java automatically and easily

Postby xenopeek on Wed Feb 15, 2012 5:33 pm

grizzler wrote:@Vincent,
For the record, the link in Pjotr's posting points to the origin of the information provided in that other HowTo. That thread is now incomplete.

Whoops :oops: Thanks for spotting that :wink: I've merged the post back to this topic.
User avatar
xenopeek
Level 21
Level 21
 
Posts: 15280
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: HOW TO: Install Sun (Oracle) Java on Linux Mint

Postby c-m on Tue Feb 21, 2012 10:56 am

We shouldn't have to go all that hassle. Isn't computing meant to be user friendly and intuitive?

Where is the deb file? Has anyone created one? Can't we create one from the RPM?
c-m
Level 3
Level 3
 
Posts: 114
Joined: Mon Aug 24, 2009 2:01 pm

Re: HOW TO: Install Sun (Oracle) Java on Linux Mint

Postby sagirfahmid3 on Tue Feb 21, 2012 11:12 am

Deb files are there, but from launchpad (anyone can make it, therefore it cannot be believed to be safe!)
I'd rather get the official Java from Oracle's website than risk my computer's security over 2 minutes of typing commands.
User avatar
sagirfahmid3
Level 6
Level 6
 
Posts: 1054
Joined: Sun Sep 04, 2011 12:39 pm

Re: HOW TO: Install Sun (Oracle) Java on Linux Mint

Postby c-m on Tue Feb 21, 2012 12:13 pm

True - that makes sense.

Doesn't java come installed as standard on mint 11?

I've got a package called Java(TM) Plug-in, Java SE 6 installed via the package manager.

It doesn't seem to work though with either Firefox or Chromium
c-m
Level 3
Level 3
 
Posts: 114
Joined: Mon Aug 24, 2009 2:01 pm

Re: HOW TO: Install Sun (Oracle) Java on Linux Mint

Postby sagirfahmid3 on Tue Feb 21, 2012 1:11 pm

I've got a package called Java(TM) Plug-in, Java SE 6 installed via the package manager.

It doesn't seem to work though with either Firefox or Chromium

Same with me (and I'm on Mint 9), until I manually installed it. It seems to be a common issue among LMint in general. It's got something to do with the shortcuts to Java not being in the plugins folder. BEFORE I found out about Pjotr's guide, I had to use Windows for Java applications.

And also, the Java in repos is outdated (Java6 update26) and the current update is I think Java6 update31, so yeah, big deal. Java viruses are annoying; I've seen them on YouTube destroying people's computers. Better to keep it updated to the latest version!
User avatar
sagirfahmid3
Level 6
Level 6
 
Posts: 1054
Joined: Sun Sep 04, 2011 12:39 pm

Linux Mint is funded by ads and donations.
 
Next

Return to Tutorials

Who is online

Users browsing this forum: DJNightchild and 11 guests