Installing Sun's Java environment on Debian systems

Posted by Steve on Tue 17 May 2005 at 17:50

Tags: ,

Several popular tools require a Java runtime environment, or JRE, to work. Whilst there a growing number of open Java environments at times installing Sun Java environment is the pragmatic approach - unfortunately the software doesn't come in a Debian package. This short recipe shows how to install a Java SDK, or JDK, as a Debian package, and make it work inside your browser.

Whilst there is nothing wrong with installing software outside the control of the Debian packaging system, it's not something that should be undertaken lightly as it makes it hard to keep track of installations, and it complicates updating a number of machines from a centralised Debian package repository.

Thankfully there are facilities available which make it a simple job to install Sun's Java as a Debian package.

Two packages we're going to need are java-package, and fakeroot. These can be installed simply:

apt-get install fakeroot java-package

Once the relevent packages have been installed you will need to download the Sun release of the Java package from http://java.sun.com

At the time of writing the most current version can be found here:

Once you agreed to the license presented to you, and have downloaded the file you will have something like jre-1_5_0_03-linux-i586.bin.

To turn this into a Debian package you should run:

fakeroot make-jpkg jre-1_5_0_03-linux-i586.bin

This command will first prompt for confirmation, then :

  • Ask you for your name
  • Ask you for your email address
  • Display a license agreement:
    • Press Space to scroll down, or q to quit.
    • Type "yes" to indicate you agree with the terms.

(The name, and email address, you give will be inserted into the Debian package information - and not sent to Sun.)

Once these questions have been answered the process will inform you that your package has been built shortly afterwards. The final output you should expect to see will look something like this:

The Debian package has been created in the current directory. You can
install the package as root (e.g. dpkg -i sun-j2re1.5_1.5.0+update03_i386.deb).

As the instructions tell you it is now possible for you to install the package by becoming root and running:

dpkg -i sun-j2re1.5_1.5.0+update03_i386.deb

One final step might be for you to ensure the Java software works for Mozilla Firefox, or the Mozilla browser.

The package you've installed should include a plugin for your browser. At the time of writing the most recent Sun Java version we've been using will install a plugin for you at the following location:

/usr/lib/j2re1.5-sun/plugin/i386/ns7/libjavaplugin_oji.so

Create a symlink to this directory in your home directory:

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

If you wish to do this for all users on the current system instead run, as root:

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

(You might find that the plugin has been automatically installed for all users - so it's worth checking whether you need to complete this last step yourself.)


Posted by Anonymous (130.231.xx.xx) on Wed 18 May 2005 at 09:36
There's an extra paren and period on the dpkg command line.

Home is not neccessarily in /home/username, but it should be more easily and certainly in ~/ or $HOME/.

[ Parent | Reply to this comment ]

Posted by Steve (82.41.xx.xx) on Wed 18 May 2005 at 09:39
[ Send Message | View Steve's Scratchpad | View Weblogs ]

Thanks for pointing those out - I've updated the piece now to correct the mistakes.

Steve
-- Steve.org.uk

[ Parent | Reply to this comment ]

Posted by Anonymous (195.212.xx.xx) on Wed 18 May 2005 at 11:20
Despite all the advice on the web saying to use fakeroot to make the package, I've never been able to use it once. Invariably the fakeroot command fails some way or another, and I resort to the usual sudoing while running make-jpkg. What's wrong with this approach? My machine doesn't seem to be fucked up yet :) Is there a reason for which fakeroot fails?

[ Parent | Reply to this comment ]

Posted by Steve (82.41.xx.xx) on Wed 18 May 2005 at 11:26
[ Send Message | View Steve's Scratchpad | View Weblogs ]

What's wrong with not using fakeroot? Nothing.

Ultimately you need to be root on the machine to install the package on it, so it's not a huge win to be able to do the build as a non-root user - you're just buying security in case there's a bug in the make-jpkg tool.

The idea of running the least amount of things as root as necessary is just a good habit to be in - which is probably why it's often recommended.

As to why your fakeroot build fails - hard to see without seeing what error messages you're getting. If it happens in the future it would be useful if you filed a bug about the problem.

Steve
-- Steve.org.uk

[ Parent | Reply to this comment ]

Posted by Anonymous (80.46.xx.xx) on Wed 25 May 2005 at 08:24
I have not looked at java-package for sometime now but the early java 1.5 SUN packages would try to install some stuff in /etc/ If you use fakeroot you are not root so cannot install anything in /etc so the fakeroot install fails... while if you use sudo you ARE root so you can continue.

[ Parent | Reply to this comment ]

Posted by Anonymous (83.64.xx.xx) on Mon 30 May 2005 at 08:05
No, you should NOT run it as root. During the package creation the original sun-package tries to install files into /etc. make-jpkg fixes this in a debian way.

When creating the java package errors are shown on the page (because as non-root the copy of those files will fail).

Try to run make-jpkg as root - it will fail, telling you to run it as fakeroot.

Install the debian package as root. The files - which produced the erros during the package creation ARE on the "right" (debian) place (check the content of the debian package with dpkg -L).

[ Parent | Reply to this comment ]

Posted by Anonymous (85.60.xx.xx) on Tue 6 Dec 2005 at 02:37
This comment was very helpful. It should be in the documentation of java-package.

[ Parent | Reply to this comment ]

Posted by Anonymous (213.216.xx.xx) on Thu 19 May 2005 at 12:39
Commited to work on:

Ubuntu Hoary/Hedgehog amd64 (64bit java, no plugin) and i386

Lukasz Nowak

PS. _Great_ site Steve!! :D

[ Parent | Reply to this comment ]

Posted by Steve (82.41.xx.xx) on Fri 20 May 2005 at 06:27
[ Send Message | View Steve's Scratchpad | View Weblogs ]

Thanks!

It is good to know that at least some of the articles apply to Ubuntu, but I guess it's not a huge suprise as most of the packages will be largely the same as Debian's original ones.

Might be worth having an Ubuntu related poll..?

Steve
-- Steve.org.uk

[ Parent | Reply to this comment ]

Posted by Anonymous (213.216.xx.xx) on Fri 20 May 2005 at 08:26
I think so - many people are interested in Ubuntu (and many Debian converts like me).

[ Parent | Reply to this comment ]

Posted by Anonymous (195.250.xx.xx) on Wed 1 Jun 2005 at 16:11
from Dimenti
very nice article, no probes, no mistakes, exactly:)
good manual for beginers

[ Parent | Reply to this comment ]

Posted by simms (69.157.xx.xx) on Thu 2 Jun 2005 at 00:58
[ Send Message ]
awesome!
it actually worked right off the bat and i didn't have to install the firefox plugin explicitly. very nice.

[ Parent | Reply to this comment ]

Posted by Anonymous (151.197.xx.xx) on Mon 6 Jun 2005 at 02:59
Just installed Kanotix earlier today, and had a program that needed Java. I'm very thankful that I can use your tutorial and didn't need to do anything different (then again I have a very new and clean system). It's installed and running. Thank you again.

[ Parent | Reply to this comment ]

Posted by Anonymous (82.105.xx.xx) on Wed 15 Jun 2005 at 22:39
The script used by make-jpkg to recognize which kind of JRE is used don't find the file jre-1_5_0_03-linux-i586.bin as Sun JRE and exit without building the deb package.

The problem is in dpkg-architecture used to find which architecture is in use.

For my Pentium4 with "unstable" dpkg-architecture give:

DEB_BUILD_ARCH=i386
DEB_BUILD_ARCH_OS=linux
DEB_BUILD_ARCH_CPU=i386
DEB_BUILD_GNU_CPU=i486
DEB_BUILD_GNU_SYSTEM=linux-gnu
DEB_BUILD_GNU_TYPE=i486-linux-gnu
DEB_HOST_ARCH=i386
DEB_HOST_ARCH_OS=linux
DEB_HOST_ARCH_CPU=i386
DEB_HOST_GNU_CPU=i486
DEB_HOST_GNU_SYSTEM=linux-gnu
DEB_HOST_GNU_TYPE=i486-linux-gnu

The /usr/share/java-package/sun-j2re.sh script look for a "i386-linux" architecture which is not found in dpkg-architecture output.

So change the /usr/share/java-package/sun-j2re.sh, the line 6, from:
"i386-linux")
to:
"i486-linux-gnu")

Now make-jpkg recognize the Sun JRE archive and will build the deb package.

[ Parent | Reply to this comment ]

Posted by Anonymous (85.159.xx.xx) on Thu 16 Jun 2005 at 10:00
On ubuntu-amd64

$ fakeroot make-jpkg jre-1_5_0_03-linux-amd64.bin
Creating temporary directory: /tmp/make-jpkg.XXXXhrZV3H
Loading plugins: blackdown-j2re.sh blackdown-j2sdk.sh common.sh ibm-j2re.sh ibm-j2sdk.sh j2re.sh j2sdk.sh j2se.sh sun-j2re.sh sun-j2sdk.sh

No matching plugin was found.
Removing temporary directory: done

[ Parent | Reply to this comment ]

Posted by Anonymous (67.68.xx.xx) on Sun 19 Jun 2005 at 08:07
Try:
DEB_BUILD_GNU_TYPE=x86_64-linux fakeroot make-jpkg jdk-1_5_0_03-linux-amd64.bin

It worked for me (amd64 on Debian unstable).

[ Parent | Reply to this comment ]

Posted by Anonymous (87.81.xx.xx) on Sat 5 Nov 2005 at 17:42
THANK YOU!!!!

[ Parent | Reply to this comment ]

Posted by Anonymous (84.63.xx.xx) on Tue 10 Jan 2006 at 11:46
THANK YOU!!!!!!

jo

[ Parent | Reply to this comment ]

Posted by Anonymous (203.129.xx.xx) on Fri 19 May 2006 at 09:34
Unfortunately, it doesn't work for me. I have the latest fakeroot and java-package

Running Ubunty Breezy on AMD64. "No matching plugin was found."

Any ideas?

Vinod.

[ Parent | Reply to this comment ]

Posted by Anonymous (24.58.xx.xx) on Sun 19 Jun 2005 at 12:41
Well done!

Had a Firefox tab with BroadbandReports' Java speed test open. Read and followed the instructions, refreshed the page, and voila! Worked perfect.

Excellent site.

[ Parent | Reply to this comment ]

Posted by Anonymous (151.197.xx.xx) on Tue 21 Jun 2005 at 07:33
I´m recieving the same error on Kanotix 32. Now I know the method works because I tried it recently with another Kanotix build, and it worked exactly as described. Now I get:
$ fakeroot make-jpkg jre-1_5_0_03-linux-i586.bin
Creating temporary directory: /tmp/make-jpkg.XXXXhrZV3H
Loading plugins: blackdown-j2re.sh blackdown-j2sdk.sh common.sh ibm-j2re.sh ibm-j2sdk.sh j2re.sh j2sdk.sh j2se.sh sun-j2re.sh sun-j2sdk.sh

No matching plugin was found.
Removing temporary directory: done

So my question is why not use the RPM binary file (after extracting the RPM), and use alien to make a deb that can be installed. Would that be another option?

[ Parent | Reply to this comment ]

Posted by Anonymous (192.146.xx.xx) on Tue 21 Jun 2005 at 14:01
I saw the same error messages when I tried to install the jre
on an intel x86 box. Try the following line as a normal user:
DEB_BUILD_GNU_TYPE=i386-linux fakeroot make-jpkg jre-1_5_0_03-linux-i586.bin
It worked perfectly for me.

[ Parent | Reply to this comment ]

Posted by Anonymous (151.197.xx.xx) on Sun 26 Jun 2005 at 21:49
worked very well.
Thank you.

[ Parent | Reply to this comment ]

Posted by Anonymous (87.194.xx.xx) on Fri 27 Oct 2006 at 14:37
DEB_BUILD_GNU_TYPE=i386-linux fakeroot make-jpkg jr*

Works perfect. Thank you very much :)

[ Parent | Reply to this comment ]

Posted by Anonymous (83.151.xx.xx) on Thu 30 Jun 2005 at 17:05
FYI: Your instructions worked for my i586 with Ubuntu and installing the JDK rather than the JRE (just different file names). Also the java plugin 'just worked' in firefox without having to link anything after the install.

The only hitch I had was that 'java-package' is not available from Ubuntu's package repository and so I had to manually amend /etc/apt/sources.list to add a line pointing to debian.org to get it.

[ Parent | Reply to this comment ]

Posted by stephanhuiser (82.93.xx.xx) on Sun 25 Sep 2005 at 12:05
[ Send Message ]
What line in /etc/apt/sources.list did you add?

[ Parent | Reply to this comment ]

Posted by Anonymous (62.252.xx.xx) on Tue 6 Dec 2005 at 14:14
You'd probably be better off adding the 'multiverse' repo, it's in there for breezy.

[ Parent | Reply to this comment ]

Posted by Anonymous (200.73.xx.xx) on Sat 2 Jul 2005 at 17:14
Thanx man! The time you saved me with your article! ;)

[ Parent | Reply to this comment ]

Posted by Anonymous (84.222.xx.xx) on Wed 6 Jul 2005 at 12:14
Very useseful article (and comments)!!!
Thanks!

grog_

[ Parent | Reply to this comment ]

Posted by Anonymous (62.101.xx.xx) on Fri 15 Jul 2005 at 09:37
GREAT. Thanks, I don't need create symlink to plugins... it was already configured in /etc/alternative. I don't know why

[ Parent | Reply to this comment ]

Posted by Anonymous (219.207.xx.xx) on Sat 16 Jul 2005 at 01:12
thx! i just reinstalled system & tunning general confs.
today was 2nd time trying this method (1st got from another place).
1st time put jre, now jdk1.5+up4, everythings OK! (Firefox/Konqueror/Azureus)

ps. system just installed (D-I), gcc was out, than "apt-get install g++" to get some compilers...

[ Parent | Reply to this comment ]

Posted by Anonymous (68.236.xx.xx) on Tue 26 Jul 2005 at 20:56
I first got the error: No matching plugin was found.
So I ran:

DEB_BUILD_GNU_TYPE=i386-linux fakeroot make-jpkg jre-1_5_0_03-linux-i586.bin

I went through all the questions, and it extracted the .bin, but then the first error I got was:
mkdir: cannot create directory `/etc/.java': Permission denied

And after that I got a bunch of mkdir and cp permission denied errors.

Then I got the following:
Testing extracted archive... okay.

Create debian package:
dh_testdir
dh_testroot
dh_installchangelogs
dh_installchangelogs:

Aborted (dh_installchangelogs).

Removing temporary directory: done
---------
Anyone know what's causing this? Also, would downloading the rpm and using alien to conver it to a .deb work? I know the question was asked before, but it was never answered.
Thanks in advance.

[ Parent | Reply to this comment ]

Posted by Steve (82.41.xx.xx) on Tue 26 Jul 2005 at 21:02
[ Send Message | View Steve's Scratchpad | View Weblogs ]

Sounds like you didn't run fakeroot.

Using alien would probably work but it's not supported, and not expected to work.

Try it and see?

Steve
-- Steve.org.uk

[ Parent | Reply to this comment ]

Posted by Anonymous (68.236.xx.xx) on Tue 26 Jul 2005 at 21:20
I'm sure I ran fakeroot, I tried installing it more then once. Do I have to configure anything for fakeroot to allow my username or something?

[ Parent | Reply to this comment ]

Posted by Steve (82.41.xx.xx) on Tue 26 Jul 2005 at 21:22
[ Send Message | View Steve's Scratchpad | View Weblogs ]

Nope just prefix the make-jpkg command with fakeroot as shown in the article and it should work - but you show errors like 'permission denied' which make me suspect you didn't do that.

Steve
-- Steve.org.uk

[ Parent | Reply to this comment ]

Posted by Anonymous (68.236.xx.xx) on Tue 26 Jul 2005 at 21:28
I just tried it once again, and made sure I had fakeroot there, here's an exact copy/paste of the command I ran:

steve@DebServ:~/files$ DEB_BUILD_GNU_TYPE=i386-linux fakeroot make-jpkg jre-1_5_0_03-linux-i586.bin

And I still get the errors.
I run the command, and after it prompts for the terms of agreements, it extracts/inflates/creates a bunch of files fine, then I get the permission denied errors.
These errors are on dirs in /usr/share and /etc
Shouldn't it not be touching anything there?

[ Parent | Reply to this comment ]

Posted by Steve (82.41.xx.xx) on Tue 26 Jul 2005 at 21:47
[ Send Message | View Steve's Scratchpad | View Weblogs ]

Having just downloaded jdk-1_5_0_04-linux-i586.bin to see if I can replicate your error I get the following error too:


Creating jdk1.5.0_04/jre/lib/deploy.jar
mkdir: cannot create directory `/etc/.java': Permission denied
mkdir: cannot create directory `/etc/.java/.systemPrefs': No such file or directory
touch: cannot touch `/etc/.java/.systemPrefs/.system.lock': No such file or directoryDone.
...
snip

The package is still built, although I don't know how well it will work.

Looking at the java-package bug list I see the following relevent bug entry:

So I guess you're not alone.

If you're in a hurry install the package and see how well it works, if you're not wait for it to be fixed in a new java-package version I guess.

Steve
-- Steve.org.uk

[ Parent | Reply to this comment ]

Posted by parsingphase (87.74.xx.xx) on Thu 23 Feb 2006 at 10:55
[ Send Message | View Weblogs ]

Surely this is exactly why we're using fakeroot? To stop these files from being tampered with?

I've used this article, minus the browser plugins, to get wildfire working, and it all ran perfectly, even with the above errors.

[ Parent | Reply to this comment ]

Posted by GaryMc (62.254.xx.xx) on Thu 2 Mar 2006 at 23:10
[ Send Message ]
Hey, Steve,

I am getting the same error, however the package is not built.

Any ideas what I'm missing (I did follow up the bug link referenced, but it also assumes that the package is indeed built.


Here's a snippet of the command output:

$ DEB_BUILD_GNU_TYPE=i386-linux fakeroot make-jpkg jdk-1_5_0_06-linux-i586.bin

[snip]
touch: cannot touch `/etc/.java/.systemPrefs/.system.lock': No such file or dire
ctory
chmod: cannot access `/etc/.java/.systemPrefs/.system.lock': No such file or dir
ectory
touch: cannot touch `/etc/.java/.systemPrefs/.systemRootModFile': No such file o
r directory
chmod: cannot access `/etc/.java/.systemPrefs/.systemRootModFile': No such file
or directory
/home/gary/javabin/jdk-1_5_0_06-linux-i586.bin: line 359: /etc/mailcap: Permissi
on denied

Done.

Testing extracted archive... okay.

Create debian package:
dh_testdir
dh_testroot
dh_installchangelogs
dh_installchangelogs:

Aborted (dh_installchangelogs).

Removing temporary directory: done

$ ls -al
total 47888
drwxrwxr-x 2 gary gary 4096 2006-03-03 00:27 ./
drwxr-xr-x 20 gary gary 4096 2006-03-03 00:27 ../
-rwxr-xr-x 1 gary gary 48974825 2006-03-02 23:27 jdk-1_5_0_06-linux-i586.bin*


Any ideas?

[ Parent | Reply to this comment ]

Posted by Anonymous (205.251.xx.xx) on Mon 10 Oct 2005 at 07:05
I'm having this exact problem. Anyone know how to work around it yet?

Adam

[ Parent | Reply to this comment ]

Posted by Anonymous (125.236.xx.xx) on Fri 2 Mar 2007 at 19:48
I was having this problem. I fixed it by having the .bin file in the /home/ dir of the user i was running it from.

[ Parent | Reply to this comment ]

Posted by louise (67.181.xx.xx) on Wed 10 Aug 2005 at 15:46
[ Send Message ]
Following the instructions:
apt-get install fakeroot java-package (worked properly)

Downloaded the latest version (jre-1_5_0_04-linux-i586.bin)

Using the following command:
DEB_BUILD_GNU_TYPE=i386-linux fakeroot make-jpkg jre-1_5_0_04-linux-i586.bin

Got as far as accepting the license and then:
--------------------
Do you agree to the above license terms? [yes or no]
yes
Unpacking...
Checksumming...
0
0
Extracting...
./install.sfx.8984: error while loading shared libraries: libfakeroot.so.0: cannot open shared object file: No such file or directory
/home/username/jre-1_5_0_04-linux-i586.bin: line 529: cd: jre1.5.0_04: No such file or directory
-------------------------------
followed by many more Permission denied errors.

Checked to make sure libfakeroot.so.0 was there with proper permissions (looks okay). It is in /usr/lib

Any assistance would be appreciated. - Thanks!

[ Parent | Reply to this comment ]

Posted by Steve (82.41.xx.xx) on Wed 10 Aug 2005 at 16:06
[ Send Message | View Steve's Scratchpad | View Weblogs ]

Strange, I just downloaded the latest version myself and tried to replicate this.

Whilst I do get some of the errors highlighted in previous comments, which look like this:

reating jre1.5.0_04/lib/deploy.jar
mkdir: cannot create directory `/etc/.java': Permission denied
mkdir: cannot create directory `/etc/.java/.systemPrefs': No such file or directory
touch: cannot touch `/etc/.java/.systemPrefs/.system.lock': No such file or directory
chmod: cannot access `/etc/.java/.systemPrefs/.system.lock': No such file or directory

The rest of the build, and the installation appears to work correctly.

I'm suspicious of the shared library error as that seems to be a non-java problem. Upon my host I see:

skx@mystery:~$ ls /usr/lib/libfakeroot*
/usr/lib/libfakeroot.so.0           /usr/lib/libfakeroot-tcp.so.0
/usr/lib/libfakeroot-sysv.so.0      /usr/lib/libfakeroot-tcp.so.0.0.1
/usr/lib/libfakeroot-sysv.so.0.0.1

/usr/lib/libfakeroot:
libfakeroot-sysv.so.0      libfakeroot-tcp.so.0
libfakeroot-sysv.so.0.0.1  libfakeroot-tcp.so.0.0.1

You say that you have libfakeroot.so.0 present. Is it fully installed? (ie. it is not a broken symlink or something silly like that?).

Finally I guess if everything is OK you should be able to test fakeroot by running the following:

skx@mystery:/tmp$ fakeroot /usr/bin/id
uid=0(root) gid=0(root) groups=20(dialout),...1000(skx)

Does that work as expected?

Steve
-- Steve.org.uk

[ Parent | Reply to this comment ]

Posted by louise (67.181.xx.xx) on Wed 10 Aug 2005 at 16:55
[ Send Message ]
Sorry - pilot error. I did not download the correct version - I needed the amd64 version.

The installation was successful.

I'm running the 32-bit version of firefox on an AMD64 system. My task now is to get the plugins straightened out.

Thanks!



[ Parent | Reply to this comment ]

Posted by Al3xiss (193.226.xx.xx) on Mon 20 Nov 2006 at 00:09
[ Send Message ]
Hello.

I have been getting almost the same error messages as luises', only I'm running the correct version of jdk, for amd64.

Just before the problem statements written before (about permission & no such file), I get an error stating that a binary file cannot be executed :

/home/alex/jdk-1_5_0_09-linux-amd64.bin: line 396: ./install.sfx.12302: cannot execute binary file

Has anyone encountered such a problem before ? Can anyone help ?

Thank You.

Alex.


[ Parent | Reply to this comment ]

Posted by logiq (82.51.xx.xx) on Thu 11 Aug 2005 at 16:37
[ Send Message ]
hi!
i've installed java using the method descripted in sun's page (executing the bin), but now i'm experiencing problems installing Azureus via apt, as it says i don't have java installed.. can i solve this problem without having to repeat java's install procedure?
besides that, firefox works smoothly, the only problem is Azureus!

thanks :)
logiq

[ Parent | Reply to this comment ]

Posted by Steve (82.41.xx.xx) on Thu 11 Aug 2005 at 19:15
[ Send Message | View Steve's Scratchpad | View Weblogs ]

What is the error?

If it is that you don't have a specific package installed (to satisfy dependencies) then you might be out of luck unless you create a virtual/dummy package.

If it is something else we might be able to help.

(I admit I'm not familiar with the package you mention..)

Steve
-- Steve.org.uk

[ Parent | Reply to this comment ]

Posted by grimoire (82.69.xx.xx) on Mon 15 Aug 2005 at 20:16
[ Send Message ]
It's probably worth mentioning Sun's Java licensing in the article, i.e. why it's not packaged for Debian, why there are Free alternatives and why people may not want to install Sun's Java.

[ Parent | Reply to this comment ]

Posted by Anonymous (201.249.xx.xx) on Sat 27 Aug 2005 at 17:12
Well. You can Install it to by the manual way, I mean without creating a debian package, if you need I can publish it here, i however I suppose you already know...because i had the same problems and i enden installing it the "generic" way.

[ Parent | Reply to this comment ]

Posted by Anonymous (195.248.xx.xx) on Mon 5 Sep 2005 at 14:33
It's probably worth mentioning that you can avoid all of this hassle using the unofficial debian packages from blackdown.org. Simply add

deb ftp://ftp.tux.org/java/debian/ sarge non-free

to your /etc/apt/sources.list.

More info to be found here: http://www.blackdown.org/java-linux/java2-status/jdk1.4-status.ht ml#debs

I think it has also found its way into Alioth or experimental.

mimo

[ Parent | Reply to this comment ]

Posted by Anonymous (220.42.xx.xx) on Sun 2 Oct 2005 at 09:53
The unofficial packages from blackdown are NOT java 1.5 (which this article details). I already have 1.4 from blackdown. I have been waiting for ages and there seems no sign of 1.5 from blackdown. I find that azureus crashes all the time and have been told an upgrade to 1.5 should solve this. THAT is why I am looking at this page, and probably lots of other people.

[ Parent | Reply to this comment ]

Posted by Anonymous (82.173.xx.xx) on Mon 24 Oct 2005 at 15:40
This setup always works for me, great howto.

[ Parent | Reply to this comment ]

Posted by Anonymous (193.92.xx.xx) on Mon 24 Oct 2005 at 20:39
It worked fine with me
very clear explaination good work. Even my grandmother could start using debian
if there were such good explained articles...

[ Parent | Reply to this comment ]

Posted by Anonymous (134.48.xx.xx) on Sun 30 Oct 2005 at 18:50
i get the No matching plugin was found. error when running the "fakeroot make-jpkg " command on a G4 PPC running Kubuntu? ... any ideas as to how i can make that command work?

[ Parent | Reply to this comment ]

Posted by Anonymous (213.167.xx.xx) on Thu 3 Nov 2005 at 22:40
Great article !

I was looking for a howto on this to get azureus running...works perfectly:)

Thanks!

[ Parent | Reply to this comment ]

Posted by Anonymous (82.58.xx.xx) on Mon 7 Nov 2005 at 00:09
Dear Steve, thanks for this how-to. I still have a problem... I'using an AMD64 version of Debian Sarge (this one: http://www.debian.org/ports/amd64/). Everything goes ok building the .deb package with make-jpkg (off course I've downloaded from Sun -http://www.java.com/en/download/linux_manual.jsp- the amd64 version of the .bin file), but after I've installed the package, I cannot find the libjavaplugin. Inside /usr/lib/j2re1.5-sun there isn't the "plugin" directory (there are only bin, debian, lib and man directories) and obviously also the libjavaplugin is absent...
Any idea?
Thanks, Alessandro

[ Parent | Reply to this comment ]

Posted by Steve (82.41.xx.xx) on Mon 7 Nov 2005 at 00:34
[ Send Message | View Steve's Scratchpad | View Weblogs ]

I'm sorry I have no experience with AMD64 - I think your best bet is to ask for assistance upon the debian-user mailing list.

Steve
--

[ Parent | Reply to this comment ]

Posted by Anonymous (87.2.xx.xx) on Tue 8 Nov 2005 at 00:04
Thamks. I found the problem cited also on the Official Sun JRE forum. Here http://forum.java.sun.com/thread.jspa?forumID=32&threadID=568127 you (and who uses the AMD64 ports of Linux distributions) can find the problem. I cite from the forum: "Author: Robert-E Posts: 2 Registered: 11/2/04 Nov 4, 2004 8:36 AM (reply 2 of 10) After some additional looking on the internet I find that the plugin modules (for JRE 1.5 on AMD64 linux) were omitted deliberately. On another forum, a Mr. Stanley Ho (identified as a Java Deployment Architect from Sun Microsystems), said that it was because there was no "official port" of a 64-bit mozilla browser. So, the JRE has no plugin modules, because of some porting issues, according to Mr. Ho."
I solved with blackdown java :-)
Bye, Alessandro

[ Parent | Reply to this comment ]

Posted by elbeasto (58.108.xx.xx) on Wed 14 Feb 2007 at 21:27
[ Send Message ]
I had exactly the same problem on Etch amd64 and installed "java-gcj-compat-plugin" from synaptic and now applets work in iceweasel and it doesn't complain about a missing plugin.

cheers :-)

[ Parent | Reply to this comment ]

Posted by nEO_dIL (202.123.xx.xx) on Sat 19 Nov 2005 at 11:18
[ Send Message ]
Hello all.

I just installed Sun Java SDK 1.5.0 using java-package on a 32-bit box running Debian Sarge Testing... Oops! Quite old, nah! Here are the steps I used, and it all worked (somewhat) fine:

Before, make sure you've got coreutils and fakeroot packages installed. I also installed debhelper but I don't know if this is required.

1) Untar java-package OR java-package-0.24 OR java-package-xxx, whatever you downloaded

2) Type cd java-package-xxx

3) Rename make-jpkg to make-jpkg.out

4) Type fakeroot make install to install the java-package using fakeroot

At this point, java-package installed nicely, except that I don't get the man (manual) pages!

5) I then copied the sun-j2sdk1.5 folder from the untarred archive java-package-xxx to /usr/share/java-package and placed it there.

6) Then I opened terminal window, typed su and then entered my root password

7) In the terminal window, I just typed make-jpkg followed by the Java SDK pathname

Bingo! It all worked fine and I installed Sun Java SDK 1.5.0 nicely. All my classpaths and everyting was installed correctly.

Java SDK 1.5.0 was installed in /usr/lib/j2sdk1.5-sun

To uninstall the Java SDK, run apt or Gnome Synaptic Package Manager or whatever package manager you use and locate sun-j2sdk1.5 and uninstall.

All the best! Phew!

[ Parent | Reply to this comment ]

Posted by Anonymous (80.139.xx.xx) on Sat 26 Nov 2005 at 21:53
thanks for that walkthrough!! works fine,.

[ Parent | Reply to this comment ]

Posted by Anonymous (144.138.xx.xx) on Thu 22 Dec 2005 at 10:50
Excellent!

Thankyou very much. That was an extremely credible explanation.

:)

[ Parent | Reply to this comment ]

Posted by Anonymous (216.126.xx.xx) on Sat 21 Jan 2006 at 00:27
Thanks for this. Couldn't get regular Sun jre 1.5.0_06 install to register in Firefox. These instructions worked perfectly on Debian testing, kernel 2.6.12-1-k7, Firefox 1.0.7.

[ Parent | Reply to this comment ]

Posted by strephon (129.49.xx.xx) on Wed 25 Jan 2006 at 22:31
[ Send Message ]
Hi, steve,

I have those javaplugin installed on my debian box.
But there is a still problem to show jsp page with firefox.
Can you tell me how to fix it?

Thank you.

/usr/lib/j2sdk1.5-sun/jre/lib/i386/libjavaplugin_jni.so
/usr/lib/j2sdk1.5-sun/jre/lib/i386/libjavaplugin_nscp_gcc29.so
/usr/lib/j2sdk1.5-sun/jre/lib/i386/libjavaplugin_nscp.so
/usr/lib/j2sdk1.5-sun/jre/plugin/i386/ns7-gcc29/libjavaplugin_oji .so
/usr/lib/j2sdk1.5-sun/jre/plugin/i386/ns7/libjavaplugin_oji.so
/usr/lib/netscape/plugins-libc6/libjavaplugin.so
/usr/lib/mozilla/plugins/libjavaplugin.so
/usr/lib/mozilla-firefox/plugins/libjavaplugin.so
/var/lib/dpkg/alternatives/netscape-javaplugin.so
/var/lib/dpkg/alternatives/mozilla-javaplugin.so
/var/lib/dpkg/alternatives/firefox-javaplugin.so
/etc/alternatives/netscape-javaplugin.so
/etc/alternatives/mozilla-javaplugin.so
/etc/alternatives/firefox-javaplugin.so

[ Parent | Reply to this comment ]

Posted by Steve (82.41.xx.xx) on Thu 26 Jan 2006 at 09:42
[ Send Message | View Steve's Scratchpad | View Weblogs ]

I'm not sure I'm afraid.

Because I don't understand what you're meaning when you say "jsp pages" - that sounds more like a server-side technologoy. (Java Server Pages?)

Do Java Applets work in the browser?

Steve

[ Parent | Reply to this comment ]

Posted by Anonymous (71.255.xx.xx) on Sat 25 Feb 2006 at 05:17
I think it's good to mention that java-package is a contrib package. I spent quite some time to figure out why I can't install it. It works fine now, thanks for the article.

Do you know if it will work with the new java 6 beta? I didn't dare to instale, I'm using sarge after all :)

[ Parent | Reply to this comment ]

Posted by Anonymous (69.3.xx.xx) on Tue 14 Nov 2006 at 06:42
I just tried it with Knoppix 5, and java-package 0.28. Doesn't work!

I had to modify a few things and then I did get it to work.

I went in to /usr/share/java-package and made two mods:

First, I changed the file sun-j2sdk.sh in the obvious way to detect the jdk-6 file. Just look at all the case statements where it looks at the various jdk bin file names. I just added one that would do the obvious thing for the jdk-6 file.

Then I also created a sun-j2sdk1.6 directory that had all the same files as sun-j2sdk1.5.

Then I ran make-jpkg in the normal way: fakeroot make-jpkg jdk-6-rc-linux-i586.bin

And that created the .deb for me. This was my first time doing anything with debs and it is working nicely now that I looked through those files and figured it out. Hopefully there will soon be an update of make-jpkg with another test for java 6 (mustang) in it.

My objective in all this is to create a Java application live CD, where I can put my Java Swing app on a live CD, put it in a machine, boot the CD and have it go straight into the Java app, with no window manager or anything else. My app is in Java 6.

It looks like once I have the deb working I can install that in a custom Knoppix CD and master my own. It doesn't seem like it will be that difficult at this point. Anyway... just letting you know, you can make a Java 1.6 deb, and I'm sure that the make-jpkg maintainer will quickly add Java 6 support, because it should take him about 5 min to do that.

[ Parent | Reply to this comment ]

Posted by Anonymous (216.188.xx.xx) on Mon 29 Jan 2007 at 03:29
I was going to post exactly the same thing about the contrib sources! This might be worth ADDING into the instructions. e.g.:
Be sure that apt-get is accessing the contrib sources by ensuring that it is already in, or adding, "contrib" to the lines in the /etc/apt/sources.list file such that there are a couple of lines that read something like this:
deb ftp://[mirror.server.best**]/debian/ stable main non-free contrib
deb-src ftp://[mirror.server.best**}/debian/ stable main non-free contrib

**:  Replace [mirror.server.best**] with the name of a server that is 'net-CLOSE to you.  Find some fine ones at http://www.debian.org/mirror/list and use the program 'netselect' ("apt-get install netselect" if you don't already have it) to determine the best (i.e. fastest) server from your suspected best list.  ;-)   e.g.:
# netselect -vv debian.mirror.server.1 debian.mirror.server.2 debian.mirror.server.3 debian.mirror.server.4


Hope this helps. Thanks to you all for keeping good software alive and well. :-)

[ Parent | Reply to this comment ]

Posted by maxamillion (158.135.xx.xx) on Tue 7 Mar 2006 at 19:36
[ Send Message | View Weblogs ]
Why not just add the Blackdown repository into your apt source file and do:

----------------------------------------------------------------- ----------
pseudogen:/home/max# apt-get install j2sdk1.4
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
j2re1.4
Suggested packages:
ttf-kochi-gothic ttf-kochi-mincho j2sdk1.4-doc
Recommended packages:
gsfonts-x11
The following NEW packages will be installed:
j2re1.4 j2sdk1.4
0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded.
Need to get 26.1MB of archives.
After unpacking 67.6MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://www.tux.org testing/non-free j2re1.4 1.4.2.02-1 [22.5MB]
Get:2 http://www.tux.org testing/non-free j2sdk1.4 1.4.2.02-1 [3545kB]
Fetched 26.1MB in 5m23s (80.5kB/s)
Preconfiguring packages ...
Selecting previously deselected package j2re1.4.
(Reading database ... 87787 files and directories currently installed.)
Unpacking j2re1.4 (from .../j2re1.4_1.4.2.02-1_i386.deb) ...
Selecting previously deselected package j2sdk1.4.
Unpacking j2sdk1.4 (from .../j2sdk1.4_1.4.2.02-1_i386.deb) ...
Setting up j2re1.4 (1.4.2.02-1) ...

Setting up j2sdk1.4 (1.4.2.02-1) ...

pseudogen:/home/max#
----------------------------------------------------------------- -----------


?..... just a thought.

/me

[ Parent | Reply to this comment ]

Posted by kmlhk79 (222.166.xx.xx) on Sun 12 Mar 2006 at 07:29
[ Send Message ]
Your method is good for installation Java first time .

But when there are a new update or patchs version come out from Sun.

It will not be able to update it in a easier way.(i.e. by apt-get upgrade ...)

For example , let said I installed Sun Java 1.5.0 by your method. Later on, there are a new patch version came out (i.e. Sun Java 1.5.0.6 Update).

I have to uninstall the pervious installed package by dpkg.

Than rebuild the deb package according to your method and install it by dpkg -i again.

In the system administration point of view. This is not good with out taking upgarde and patch in to consideration.

Are there any way we may do it better ?

Such that we can simply use apt-get install and upgrade .

Ideadlly , if there are some non-offical debian site which can provide such Sun Java packaged as debain package .

Than we only need to add the apt source list and do apt-get to install and upgarde.

It will be great help and make our debian live easier.

Comment on this are welcome.


[ Parent | Reply to this comment ]

Posted by Steve (212.20.xx.xx) on Mon 13 Mar 2006 at 09:25
[ Send Message | View Steve's Scratchpad | View Weblogs ]

I'm not sure that I agree.

If you build a new package, with a higher version number, then placing it within an Apt-get repository will allow simple upgrades.

Failing that a "dpkg --install newPackage.deb" will allow it to be upgraded. Sure you must generate the new Java Package, but otherwise you shouldn't have to remove the old one to upgrade.

I manage several machines all via a local repository so I can upgrade each machine just by uploading the new package to the trusted repository - there isn't anything magical about it, and it works nicely.

Steve

[ Parent | Reply to this comment ]

Posted by kmlhk79 (222.166.xx.xx) on Wed 15 Mar 2006 at 08:55
[ Send Message ]
Dear Steve:

Oh, that is great.

But could you share me how can we build a new package, with a higher version number, then placing it within an Apt-get repository will allow simple upgrades ?

I only know how to use apt-proxy to build a partial respository. :-(

I also want to know the simple way to build a local repository.

If there are some some artical in this site, please point a link to me.

Thanks,
kmlhk79

[ Parent | Reply to this comment ]

Posted by Steve (212.20.xx.xx) on Wed 15 Mar 2006 at 09:06
[ Send Message | View Steve's Scratchpad | View Weblogs ]

When there is a newere version from Sun the new package will have a higher version. So there's no need to mess with that.

For making a repository I tend to use reprepro which has been mentioned here before:

I hope that helps.

Steve

[ Parent | Reply to this comment ]

Posted by Anonymous (24.14.xx.xx) on Sat 18 Mar 2006 at 15:02

You also might want to mention that you may need to use the update-alternatives script so that /usr/bin/java actually points to the version of java you just installed.

Here's how I did it:

tom@homer:~$ sudo update-alternatives --config java

There are 4 alternatives which provide `java'.

  Selection    Alternative
-----------------------------------------------
      1        /usr/bin/gij-wrapper-4.0
*+    2        /usr/lib/jvm/java-gcj/bin/java
      3        /usr/lib/j2sdk1.4-sun/bin/java
      4        /usr/lib/j2sdk1.5-sun/bin/java

Press enter to keep the default[*], or type selection number: 4
Using `/usr/lib/j2sdk1.5-sun/bin/java' to provide `java'.

Then, to double-check your work, try the following command:

tom@homer:~$ java -version
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)

If you installed the JDK, you might also want to check where the /usr/bin/javac symlink is pointing using this command:

tom@homer:~$ update-alternatives --display javac
javac - status is auto.
 link currently points to /usr/lib/j2sdk1.5-sun/bin/javac
/usr/lib/j2sdk1.4-sun/bin/javac - priority 314
 slave javac.1.gz: /usr/lib/j2sdk1.4-sun/man/man1/javac.1.gz
/usr/lib/j2sdk1.5-sun/bin/javac - priority 315
 slave javac.1.gz: /usr/lib/j2sdk1.5-sun/man/man1/javac.1.gz
Current `best' version is /usr/lib/j2sdk1.5-sun/bin/javac.

[ Parent | Reply to this comment ]

Posted by Anonymous (219.37.xx.xx) on Sun 26 Mar 2006 at 08:39
Hi, Debian based OS is hard for me to operate since I am used to Fedora Core.
Anyways, I jsut installed Java-1.5.0_06 on Ubuntu, and set JAVE_HOME and PATH on /etc/profile. But, it shows "1.4.2" when I type java -version command. I actually want to uninstall this previous version "1.4.2." and looking for some useful command like yum, yum remove.

Please, let me know how to remove java-1.4.2, and make java-1.5.0_06 as default.

Thanks,

Mike

[ Parent | Reply to this comment ]

Posted by Anonymous (193.178.xx.xx) on Wed 10 May 2006 at 19:44
Very useful post!!!

[ Parent | Reply to this comment ]

Posted by hutchman (198.175.xx.xx) on Fri 3 Nov 2006 at 14:17
[ Send Message ]
This was exactly my problem! After installing the Sun version ... java -version kept displaying my old java version. The update-alternatives commands above did the trick! Thanks!!!!

[ Parent | Reply to this comment ]

Posted by Anonymous (194.242.xx.xx) on Wed 29 Mar 2006 at 08:36
Before build package, make sure you have libxi6, libxp6 and libasound2

Thank for your faq

Stéphane

[ Parent | Reply to this comment ]

Posted by Anonymous (200.112.xx.xx) on Fri 7 Apr 2006 at 18:17
Where's the problem here?:
_________________________________________________________________ ______
mad@PardoSat:~$ fakeroot make-jpkg j2eesdk-1_4_03-linux.bin
You are real root -- unfortunately, some Java distributions have
install scripts that directly manipulate /etc, and may cause some
inconsistencies on your system. Instead, you should become a
non-root user and run:

fakeroot make-jpkg j2eesdk-1_4_03-linux.bin

which will allow no damage to be done to your system files and
still permit the Java distribution to successfully extract.

Aborting.
_________________________________________________________________ ______

But I am not root user, please look the prompt: mad@PardoSat:~$

And I don't know what to do.

[ Parent | Reply to this comment ]

Posted by Steve (82.41.xx.xx) on Fri 7 Apr 2006 at 21:22
[ Send Message | View Steve's Scratchpad | View Weblogs ]

fakeroot is a program which pretends to be root to the scripts/programs it runs. So the script rightly thinks that you are root!

I'd take a first step of looking at existing bug reports for either fakeroot or java-package.

Steve

[ Parent | Reply to this comment ]

Posted by ronlankford (209.177.xx.xx) on Mon 10 Apr 2006 at 21:27
[ Send Message ]
Very clearly written procedure. Easy to follow instructions with just enough technical background to make the user understand what he/she is doing.

[ Parent | Reply to this comment ]

Posted by Anonymous (195.251.xx.xx) on Thu 27 Apr 2006 at 20:50
excellent!!!!!!!!!!!!
S.K.

[ Parent | Reply to this comment ]

Posted by Anonymous (65.184.xx.xx) on Thu 11 May 2006 at 16:09
this does not work for sarge with jdk 5 gets permission denied errors.
*
knoppix@0[root]$ fakeroot make-jpkg jdk-1_5_0_05-linux-i586.bin
Creating temporary directory: /tmp/make-jpkg.XXXXRGHTQq
Loading plugins: blackdown-j2re.sh blackdown-j2sdk.sh common.sh ibm-j2re.sh ibm-j2sdk.sh j2re.sh j2sdk-doc.sh j2sdk.sh j2se.sh sun-j2re.sh sun-j2sdk-doc.sh sun-j2sdk.sh

Detected product:
Java(TM) Software Development Kit (J2SDK)
Standard Edition, Version 1.5.0+update05
Sun Microsystems(TM), Inc.
Is this correct [Y/n]: Y


Checking free diskspace: done.

In the next step, the binary file will be extracted. Probably a
license agreement will be displayed. Please read this agreement
carefully. If you do not agree to the displayed license terms, the
package will not be built.


Press [Return] to continue:

// then comes SUn's License Agreement
Sun Microsystems, Inc. Binary Code License Agreement


for the JAVA 2 PLATFORM STANDARD EDITION DEVELOPMENT KIT 5.0

SUN MICROSYSTEMS, INC. ("SUN") IS WILLING TO LICENSE THE SOFTWARE
IDENTIFIED BELOW TO YOU ONLY UPON THE CONDITION THAT YOU ACCEPT


. . .

For inquiries please contact: Sun Microsystems, Inc., 4150 Network
Circle, Santa Clara, California 95054, U.S.A. (LFI#141623/Form
ID#011801)


Do you agree to the above license terms? [yes or no]

// then there is goes
Unpacking...
Checksumming...
0
0
Extracting...
UnZipSFX 5.42 of 14 January 2001, by Info-ZIP (Zip-Bugs@lists.wku.edu).
creating: jdk1.5.0_05/
creating: jdk1.5.0_05/jre/
creating: jdk1.5.0_05/jre/bin/
inflating: jdk1.5.0_05/jre/bin/java


. . .

inflating: jdk1.5.0_05/man/ja_JP.eucJP/man1/idlj.1
Creating jdk1.5.0_05/lib/tools.jar
Creating jdk1.5.0_05/jre/lib/rt.jar
Creating jdk1.5.0_05/jre/lib/jsse.jar
Creating jdk1.5.0_05/jre/lib/charsets.jar
Creating jdk1.5.0_05/jre/lib/ext/localedata.jar
Creating jdk1.5.0_05/jre/lib/plugin.jar
Creating jdk1.5.0_05/jre/lib/javaws.jar
Creating jdk1.5.0_05/jre/lib/deploy.jar
mkdir: cannot create directory `/etc/.java': Permission denied
mkdir: cannot create directory `/etc/.java/.systemPrefs': No such file or directory
touch: cannot touch `/etc/.java/.systemPrefs/.system.lock': No such file or directory
chmod: cannot access `/etc/.java/.systemPrefs/.system.lock': No such file or directory
touch: cannot touch `/etc/.java/.systemPrefs/.systemRootModFile': No such file or directory
chmod: cannot access `/etc/.java/.systemPrefs/.systemRootModFile': No such file or directory
/ramdisk/home/root/jdk-1_5_0_05-linux-i586.bin: line 359: /etc/mailcap: Permission denied
mkdir: cannot create directory `/usr/share/icons/HighContrast': Permission denied
mkdir: cannot create directory `/usr/share/icons/HighContrastInverse': Permission denied
mkdir: cannot create directory `/usr/share/icons/LowContrast': Permission denied
cp: cannot create regular file `/usr/share/pixmaps/sun-java.png': Permission denied
cp: cannot create regular file `/usr/share/icons/HighContrast/48x48/apps/sun-java.png': No such file or directory
cp: cannot create regular file `/usr/share/icons/HighContrastInverse/48x48/apps/sun-java.png': No such file or directory
cp: cannot create regular file `/usr/share/icons/LowContrast/48x48/apps/sun-java.png': No such file or directory
/ramdisk/home/root/jdk-1_5_0_05-linux-i586.bin: line 507: /usr/share/mime-info/java-archive.keys: Permission denied
/ramdisk/home/root/jdk-1_5_0_05-linux-i586.bin: line 508: /usr/share/mime-info/java-archive.keys: Permission denied
/ramdisk/home/root/jdk-1_5_0_05-linux-i586.bin: line 509: /usr/share/mime-info/java-archive.keys: Permission denied
/ramdisk/home/root/jdk-1_5_0_05-linux-i586.bin: line 510: /usr/share/mime-info/java-archive.keys: Permission denied
/ramdisk/home/root/jdk-1_5_0_05-linux-i586.bin: line 511: /usr/share/mime-info/java-archive.keys: Permission denied
/ramdisk/home/root/jdk-1_5_0_05-linux-i586.bin: line 512: /usr/share/mime-info/java-archive.keys: Permission denied
/ramdisk/home/root/jdk-1_5_0_05-linux-i586.bin: line 515: /usr/share/mime-info/java-archive.mime: Permission denied
/ramdisk/home/root/jdk-1_5_0_05-linux-i586.bin: line 516: /usr/share/mime-info/java-archive.mime: Permission denied
/ramdisk/home/root/jdk-1_5_0_05-linux-i586.bin: line 519: /usr/share/application-registry/java-archive.applications: Permission denied
/ramdisk/home/root/jdk-1_5_0_05-linux-i586.bin: line 520: /usr/share/application-registry/java-archive.applications: Permission denied
/ramdisk/home/root/jdk-1_5_0_05-linux-i586.bin: line 521: /usr/share/application-registry/java-archive.applications: Permission denied
/ramdisk/home/root/jdk-1_5_0_05-linux-i586.bin: line 522: /usr/share/application-registry/java-archive.applications: Permission denied
/ramdisk/home/root/jdk-1_5_0_05-linux-i586.bin: line 523: /usr/share/application-registry/java-archive.applications: Permission denied
/ramdisk/home/root/jdk-1_5_0_05-linux-i586.bin: line 524: /usr/share/application-registry/java-archive.applications: Permission denied
mkdir: cannot create directory `/usr/share/icons/HighContrast': Permission denied
mkdir: cannot create directory `/usr/share/icons/HighContrastInverse': Permission denied
mkdir: cannot create directory `/usr/share/icons/LowContrast': Permission denied
cp: cannot create regular file `/usr/share/pixmaps/sun-java.png': Permission denied
cp: cannot create regular file `/usr/share/icons/HighContrast/48x48/apps/sun-java.png': No such file or directory
cp: cannot create regular file `/usr/share/icons/HighContrastInverse/48x48/apps/sun-java.png': No such file or directory
cp: cannot create regular file `/usr/share/icons/LowContrast/48x48/apps/sun-java.png': No such file or directory
/ramdisk/home/root/jdk-1_5_0_05-linux-i586.bin: line 507: /usr/share/mime-info/java-web-start.keys: Permission denied
/ramdisk/home/root/jdk-1_5_0_05-linux-i586.bin: line 508: /usr/share/mime-info/java-web-start.keys: Permission denied
/ramdisk/home/root/jdk-1_5_0_05-linux-i586.bin: line 509: /usr/share/mime-info/java-web-start.keys: Permission denied
/ramdisk/home/root/jdk-1_5_0_05-linux-i586.bin: line 510: /usr/share/mime-info/java-web-start.keys: Permission denied
/ramdisk/home/root/jdk-1_5_0_05-linux-i586.bin: line 511: /usr/share/mime-info/java-web-start.keys: Permission denied
/ramdisk/home/root/jdk-1_5_0_05-linux-i586.bin: line 512: /usr/share/mime-info/java-web-start.keys: Permission denied
/ramdisk/home/root/jdk-1_5_0_05-linux-i586.bin: line 515: /usr/share/mime-info/java-web-start.mime: Permission denied
/ramdisk/home/root/jdk-1_5_0_05-linux-i586.bin: line 516: /usr/share/mime-info/java-web-start.mime: Permission denied
/ramdisk/home/root/jdk-1_5_0_05-linux-i586.bin: line 519: /usr/share/application-registry/java-web-start.applications: Permission denied
/ramdisk/home/root/jdk-1_5_0_05-linux-i586.bin: line 520: /usr/share/application-registry/java-web-start.applications: Permission denied
/ramdisk/home/root/jdk-1_5_0_05-linux-i586.bin: line 521: /usr/share/application-registry/java-web-start.applications: Permission denied
/ramdisk/home/root/jdk-1_5_0_05-linux-i586.bin: line 522: /usr/share/application-registry/java-web-start.applications: Permission denied
/ramdisk/home/root/jdk-1_5_0_05-linux-i586.bin: line 523: /usr/share/application-registry/java-web-start.applications: Permission denied
/ramdisk/home/root/jdk-1_5_0_05-linux-i586.bin: line 524: /usr/share/application-registry/java-web-start.applications: Permission denied

Done.

Testing extracted archive... okay.

Create debian package:
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
dpkg-deb: building package `sun-j2sdk1.5' in `/tmp/make-jpkg.XXXXCMYDqU/sun-j2sdk1.5_1.5.0+update05_i386.deb'.
copy sun-j2sdk1.5_1.5.0+update05_i386.deb into directory /ramdisk/home/root/
cp: cannot create regular file `/ramdisk/home/root/sun-j2sdk1.5_1.5.0+update05_i386.deb': Permission denied

Aborted (/ramdisk/home/root/).

Removing temporary directory: done
knoppix@0[root]$


[ Parent | Reply to this comment ]

Posted by Steve (82.41.xx.xx) on Thu 11 May 2006 at 16:13
[ Send Message | View Steve's Scratchpad | View Weblogs ]

Looks like your problems aren't with the process, but with Knoppix:

cp: cannot create regular file `/ramdisk/home/root/sun-j2sdk1.5_1.5.0+update05_i386.deb': Permission denied 

That error seems pretty clear to me. Being unfamiliar with Knoppix I'm not sure what to suggest, short of checking that directory is writable, or if ramdisk based contains enough free space to contain the binary .deb package.

Steve

[ Parent | Reply to this comment ]

Posted by Anonymous (212.208.xx.xx) on Fri 3 Aug 2007 at 10:40
hi got the same problem :

<cp: cannot create regular file>

and it turned to be great once you give the permission on you non-root account to write in the file.

As I'm alone on the machine for the moment, I just gave rwx permission to everyone using the following command
<chmod 777 java>
( note that the directory I am using to create the .deb is /usr/java).

and it turned out perfectly!

Have fun.

aleX

alexàsixgirls.org