Java and Flash for Debian GNU/Linux Print E-mail
Written by machiner   
Monday, 10 October 2005 07:09
This tutorial is horribly out of date. For the current schwing, see an updated one here:Set up a Debian lenny Desktop. Sure, it's a laptop tutorial, but it's all good. Java and Flash are at your fingertips in Lenny.

[out of Archive]

Installing Java and Flash on Debian

The Flash Part

You'll need to download the Flash Player installer now from Adobe here (x86)

Installing this is no sweat. Why don't you open your terminal now. Yessir, command-line. You can type, right? OK, then, hit the alt and the F2 keys concurrently. Remember this command, it's "run". In Windows you probably didn't even know that you could hit the win and the r keys to get the same run command. Bah -- don't sweat it. If I had a penny each for all the things I don't know...When your run box pops up, type "gnome-terminal" into it. No quotes, Jack. Hit enter.

Now that we're cozy in the terminal, $ cd over to the directory you downloaded the flash-installer to. Like this:

$ cd /your/download/directory

The file that you downloaded from Macromedia is tar'd then further compressed with gzip. I know you looked at it with dismay, no worries. Unpacking this directory is a snap. If you just cd'd to your download directory we can get started. In the terminal $ ls your directory. I'm lazy, we copy & paste here. The file name that I have is install_flash_player_X_linux.tar.gz. So what I do is copy the file name (use your mouse to highlight the name, right-click, copy) and then run this command to extract the directory:

$ tar -xvzf [ctrl+shift+v]

We use the -z switch because the file is gzip'd.

Now just $ cd into your newly-made install_flash_player_7_linux directory. Cake. When you're in, make sure your browsers are closed and then run the installer like this:

$ ./flashplayer-installer

Flash is installed for Debian GNU/Linux.

The Java Part

With Debian Etch the simplest way to install Java is to fire-up a terminal, become root and run the following:
#apt-get install sun-java5-bin
However, you may continue reading this out-of-date java install tutorial for Debian Sarge if you like. :)

Installing Java is just as simple. You will have to download the Java binary from Sun. I use the Linux (self-extracting file) from this page.

Next up, you need to make sure you're using the "non-free" repositories. Don't worry, you don't owe any $$. Let's do that real fast since you're already in your terminal.

Become root ( $ su ) and then open your Apt sources file like this

# nano /etc/apt/sources.list

Append the end of your .../debian main line with

contrib non-free

My entry looks like this: deb ftp://debian.uchicago.edu/debian/ stable main contrib non-free

Now you save your sources.list file and close Nano. So, ctrl+x, y, then enter. At your prompt you can now

# apt-get update

Installing Java this way will no doubt have naysayers as well - you know what? Is cool - this is Linux, man. More power to 'em, right? I like this way you don't have to. I make chocolate cake from scratch - what about you? Anyway - now that we're ready let's get Java on.

At your command prompt run the following command:

# apt-get install java-package

Yes, y, to dependencies. 'Course, this all only takes a few seconds to do...and you're getting pretty savvy with the command line by now? Right? (Get busy, here and here .)

$ cd over to the directory that you downloaded the Java binary to. Now we can make a deb package out of the binary and thus allow Apt, dpkg to manage Java on your system. Here's the command:

$ fakeroot make-jpkg jre-1_5_0_06-linux-i586.bin (Careful with the "cut&paste", which Java version did you download?)

You'll have to agree and then go through names and such. I just use defaults, root, etc. Again, you agree - now to the Sun license. Use your space bar to run through the pages. Then you must type yes to accept the license.

You'll see Java unpack and then create your .deb package. When it's finished you will even have the command to run to install the .deb file. Just copy it from about 2 lines up from your prompt, then become root, and then [ctrl+shift+v] to paste the dpkg -i install command.

To install the Java plugin for Mozilla (I just do it as root for system wide) just run the following command:

# ln -s /usr/lib/j2re1.5-sun/plugin/i386/ns7/libjavaplugin_oji.so \
/usr/lib/mozilla/plugins/

You're done. No charge. Enjoy Debian

machiner - 10 Oct 2005

Last Updated on Friday, 27 February 2009 12:14