<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Michael H,<br>
<br>
Hi. I hadn't seen your name before. I put your last initial there
since we have about 4-5 Michael's in the group. Welcome and thanks for
the info. I don't always reply just to say thanks, but I always
appreciate any answers to my threads. I'm going to take a look at the
info you sent as well as other replies regarding Java, hopefully
shortly, when I get some more time. Right now, my shared printer is
down after upgrading my PC's to Ubuntu 11.04. I have this little
Linksys PSUS4 stand alone print server which is refusing to cooperate.
Fun, fun, fun. I'm saving your message for another day though.<br>
<br>
Sincerely,<br>
<br>
Ron<br>
<br>
On 11/09/2011 01:42 PM, Michael Hirsch wrote:
<blockquote
cite="mid:CAL4OPA8b57tR_Dau-TrKP8DDhB+-8P2UhVaAHmSvOG+8aLP1kA@mail.gmail.com"
type="cite">
<div class="gmail_quote">On Sat, Nov 5, 2011 at 4:33 PM, Ron Frazier <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:atllinuxenthinfo@c3energy.com">atllinuxenthinfo@c3energy.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I
just finished spending an hour reading through a 14 PAGE printed howto<br>
document telling me how to uninstall old Sun Java from Ubuntu and<br>
reinstall the new version and how to do the same thing EVERY time there<br>
is an update. ( If you're interested, here's the procedure:<br>
<a moz-do-not-send="true"
href="https://sites.google.com/site/easylinuxtipsproject/java"
target="_blank">https://sites.google.com/site/easylinuxtipsproject/java</a>
) While I<br>
appreciate the publisher of the web page making this available, my<br>
general response is YOU GOTTA BE KIDDING! Now I get to spend HALF an<br>
HOUR on EVERY COMPUTER updating Java EVERY TIME there is an UPDATE!!!<br>
</blockquote>
<div><br>
Ye gods! I hadn't read that. Yes, that is a long set of commands. Of
course most of them are scriptable, but still... And then there is the
fact that they don't really appear to work. Following them will give
you the proper java, but not the proper javac, javaws, jexec, keytool,
etc. I appear to have 30 files in /etc/alternatives related to java,
and those instructions seem to fix only one of them.<br>
<br>
The update-alternatives and update-java-alternatives do seem to have
the capability to link all 30 of those files to the right places, but
I've never gotten it to work. So I've given up on it. Too bad.<br>
<br>
Here's what works for me. It takes about 5 minutes the first time,
then only a minute or so subsequently, not counting download time:<br>
<br>
Download the jdk from oracle and install it in /opt, or if you prefer
/opt/java. So inside my /opt I have <br>
jdk1.4.2_19<br>
jdk1.5.0_22<br>
jdk1.6.0_22<br>
jdk1.6.0_23<br>
jdk1.6.0_24<br>
jdk1.6.0_27<br>
jdk1.7.0<br>
<br>
Now (as root) edit /etc/profile.d/java.sh and make it read (but correct
the version):<br>
<br>
export JDK_HOME=/opt/jdk1.6.0_27<br>
export JAVA_HOME=/opt/jdk1.6.0_27<br>
PATH=${JDK_HOME}/bin:$PATH<br>
<br>
Note that the file does not need to be executable.<br>
<br>
For bonus points, add the mozilla plugin:<br>
<br>
ls -lf /opt/jdk1.6.0_27/jre/lib/amd64/libnpjp2.so
/usr/lib/mozilla/plugins/libjavaplugin.so<br>
<br>
This will setup java for anyone who logs in and uses a sh-compatible
shell (including bash, of course).<br>
<br>
You might have to go around deleting old versions of the java plugin if
one is installed somewhere else.<br>
<br>
Now if you have multiple versions installed, you can globally switch
them by editing one file. You need to restart your shell to have it
take effect. You can also run '. /etc/profile.d/java.sh' in a shell to
point to whichever java it points to. Copying that file to a personal
directory makes it easy to edit and switch your java without affecting
your users.<br>
<br>
Hope that helps,<br>
<br>
Michael</div>
</div>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
(PS - If you email me and don't get a quick response, you might want to
call on the phone. I get about 300 emails per day from alternate energy
mailing lists and such. I don't always see new messages very quickly.)
Ron Frazier
770-205-9422 (O) Leave a message.
linuxdude AT c3energy.com
</pre>
</body>
</html>