Login (generic cert)
Logout

Debian Squeeze with OpenBox

Debian GNU/Linux - Squeeze with OpenBox
Guests 23
If you can walk and chew gum at the same time, you can run GNU/Linux
Blog Pushes

debian tutorials
debiantutorials.org is built on and runs on Debian.

 

Creative Commons License
Java install in Debian Lenny Print E-mail
blogs - ezsurfer
Written by Clif Brunstetter   
Sunday, 29 March 2009 14:32

NOTE - before you go through this, read the comments to this post below.   The comments indicate a far easier methodology to install Java.

 

Sorry it's ben so long, and now I have something useful to contribute.   I spent most of the past week, flat on my back following Sinus surgery.  Hopefully, now I can just get well.  I've had a cold (or at least feels and looks like one - sinusitis) since September.  Things are really looking better since the surgery, and I can already breathe.

But in my heyday, I promised a better review and understanding of Songbird.  What I had running was so far superior to even iTunes, I think it warrants implementation.  The bad news is, I'm not there, just yet.  The good news is I think I now know why it worked so well when I first found it, and then why it failed to meet my expectations the next time I visited the application.  More on that later, but for now, I want to shed some light on Java install under Debian.

So, like a good newbie, I follow the link to the Java page, where it explains what is open or closed code, and all the good stuff we all love to hate (license agreements).  Anyway, I tried following their instructions, and I am not overly familiar with file commands in Debian, or Linux for that matter.  So, I want to share what I felt was quite a few subleties, and hopefully an inspiration or two.

 First, the should be easy stuff that I don't always know or understand.  The first couple of commands in the Java page for installation require you download a binary file (extension of bin).  that was fairly straightforward.  Then my fun began.  Since Lenny now has a root terminal (I am guessing this is the issue), the first commands to change the access structure of the file as copied failed for me.  So I eventually opened the file in the file browser (Applications - System Tools- File Browser)and here I could open the properties.  From here, I went to permissions, and set the file to read and write for all entries (likely overkill, but it allowed me to now work with the file).

I then moved the file from my desktop (default storage from the downloader) to my actual /home/username file.  This allowed me to actually set up a link that would run the file.  Just drag and drop the desktop file into the places

I then changed directory over to my /usr/local/  area.

cd /usr/local/

When I issue the next command from this directory it will allow Java to run anytime I use the machine.  Since I only have 1 user account, this works for me. From here you run the binary install program from Sun(I was in the root terminal):

/home/yourusername/jre-6u13-linux-i586.bin

This runs the binary (spacebar through each reiteration of the more for the license agreement, yes to install at the end) and voila, once complete you should have a folder in the /usr/local/ file called/jre1.6.0_13/  At least today, for release 13 of Java 1.6.0.

That's it for the install, except now you need to link the file, so your browser knows how to "see" or "enable" the java runtime.  For all new versions of Firefox (Iceweasel for Debian) you move to the correct directory (BIG NOTE HERE - these commands are changed from the Sun Java pages, and the file reference build is a jre1.6.0_13.  From my printout, it appeared to be an l, not a 1.  make sure you use the number, not a letter):

cd /usr/lib/iceweasel/plugins

ln -s /usr/local/jre1.6.0_13/plugin/i386/nc7/libjavaplugin-oji.so

This ties the Java runtime program in the /usr/local/ file over to the Iceweasel plugin base.  This is also where I ran into an undocumented issue. You see, there can only be one Java file linked in to the install at a time.  So when I went to the /usr/lib/iceweasel/plugins file, I discovered two similarly showing files with bad links. 

So once again, in the root terminal, I deleted the two bad link files, restart Iceweasel

cd /usr/lib/iceweasel/plugins

rm libjavaplugin.so

rm ns7.so

shutdown Iceweasel and then restart Iceweasel

and now Java works!

 

 Till next time,

 

ezsurfer

Comments
Add New
+/-
Write comment
Name:
Email:
 
Website:
Title:
UBBCode:
[b] [i] [u] [url] [quote] [code] [img] 
 
 
:angry::0:confused::cheer:B):evil::silly:
:dry::lol::kiss::D:pinch::(:shock:
:X:side::):P:unsure::woohoo::huh:
:whistle:;):s:!::?::idea::arrow:
 
kernel.package  - Clarification about what the instructions here rea   |97.122.80.xxx |2009-04-09 15:22:49
Congratulations on getting this posted -- you've dopne something I keep telling myself I'll get around to, but
have not yet done. There are a couple of points I'd like to make for those who may be searching for info on
debugging Sun's less-than-useful info about installing Java on a Debian system (or a Debian-derived
system).

This procedure installs 32-bit Java using the binary. (This is the binary you need to use to obtain
the browser plugin, since the 64-bit JRE does not have a plugin. Configuration though, is limited to the
plugin, not to the JRE (which I believe refers to the same thing as "virtual machine". It may or may
not "install Java" but this is not addressed by the steps in this post. Only the plugin is
confirmed.

Also, "linking" refers to something you do when you compile source code and the source
uses code that is external to the thing being compiled -- usually in a library. The Linux command that you
probably ran is "ln" which creates a link (by writing, not by linking) from another file to the file
created by the target of the link command. This target points to an inode -- it is not a copy of the thing
being pointed to. Check the man page for "ln" too learn the difference between a hard and a soft
link.


Now that I've written this, maybe the nesxt time I will contribute as you have.
Ray  - I differed like this:   |78.147.226.xxx |2009-05-09 08:38:39
I followed your instructions but I had to do this to enable the plugin on my Lenny system:
ln -s
/usr/lib/jvm/java-6-sun-1.6.0.12/jre/plugin/i386/n s7/libjavaplugin_oji.so .
machiner   |Publisher |2009-04-10 03:47:53
avatar I hope your head is feeling better after your surgery.

I don't understand this. Installing java
on your Debian machine is done through your package manager. Since you're savy in your terminal-fu,
aptitude is for you.

It's necessary to enable non-free and config repos in your
/etc/apt/sources.list file.

# nano /etc/apt/so[tab]

deb http://ftp.us.debian.org/debian lenny main contrib
non-free
deb-src http://ftp.us.debian.org/debian lenny main contrib non-free


ctrl+x, y, enter

# aptitude update
# aptitude install sun-java6-bin

OK the license and
there ya go.

Linking isn't necessary.
JC   |148.244.43.xxx |2010-01-13 11:26:24
Thanks, it work perfect!
mario   |67.181.216.xxx |2010-04-22 07:57:52
The Sun version in the repos is outdated. Update 12 I think. Latest is Update 20. Knowing how to do this
manually is important if you are concerned about security issues. However, I don't advocate installing the
latest because it's out there. Still, 8 updates is huge gap.
Stas  - Many thanks   |95.133.102.xxx |2010-05-29 13:15:06
Many thanks, it worked realy

sun-java6-bin sun-java6-jre sun-java6-jdk
worked with eclipse 3.5
!

openjava don't worked with eclipse 3.5 under Debian Lenny

3.26 Copyright (C) 2008 Compojoom.com / Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved."

Last Updated on Thursday, 23 April 2009 15:31