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
[ 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
[ 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
[ 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
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 (64.61.xx.xx) on Tue 10 Mar 2009 at 20:06
Hi! I tried these commands, but they failed until I renamed my JDK 1.5.0
My debian is an etch, installed 2008/10.

----ERROR:
$ DEB_BUILD_GNU_TYPE=i386-linux fakeroot make-jpkg java_ee_sdk-5_01-linux.bin
Creating temporary directory: /tmp/make-jpkg.RjmbI19662
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 Debian build architecture: i386
Detected Debian GNU type: i386-linux

No matching plugin was found.

----OK with the rename !:
$ mv java_ee_sdk-5_01-linux.bin jdk-1_5_0_01-linux-i586.bin
$ DEB_BUILD_GNU_TYPE=i386-linux fakeroot make-jpkg jdk-1_5_0_01-linux-i586.bin
Creating temporary directory: /tmp/make-jpkg.fMcVV19760
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 Debian build architecture: i386
Detected Debian GNU type: i386-linux

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

[ 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
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
[ 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
[ 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
[ 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
[ 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
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
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
[ 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
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
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
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
[ 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
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
[ 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
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
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
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
[ 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
[ 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
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
[ 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
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
[ 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
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
[ 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
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
[ 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

[ Parent | Reply to this comment ]

Posted by arias (67.161.xx.xx) on Sun 14 May 2006 at 00:15
Has anyone noticed that the latest j2sdk1.5 update 6 is uninstallable after creating its respective deb with make-jpkg?

When attempting to install the created package, dpkg denies it stating that a dependency missing package libpthread0 is required before install, cept the problem is that the package libpthread0 doesn't exist??!

# dpkg -i sun-j2sdk1.5_1.5.0+update06_i386.deb
(Reading database ... 473733 files and directories currently installed.)
Preparing to replace sun-j2sdk1.5 1.5.0+update06 (using sun-j2sdk1.5_1.5.0+update06_i386.deb) ...
Unpacking replacement sun-j2sdk1.5 ...
dpkg: dependency problems prevent configuration of sun-j2sdk1.5:
sun-j2sdk1.5 depends on libpthread0 (>= 0.9.17-1); however:
Package libpthread0 is not installed.
dpkg: error processing sun-j2sdk1.5 (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
sun-j2sdk1.5



What's up with that?

libpthread0 should be a natural part of glibc as these two libraries exist that are part of libc6:

/lib/libpthread.so.0
/lib/libpthread-0.10.so

What gives?

[ Parent | Reply to this comment ]

Posted by Anonymous (80.198.xx.xx) on Sun 14 May 2006 at 20:05
Running a Debian Sarge version, and the command apt-get install fakeroot java-package, does not find the java-package. Does I have to add something to sources.list?

[ Parent | Reply to this comment ]

Posted by Anonymous (85.196.xx.xx) on Thu 15 Feb 2007 at 17:26
You need to have the contrib section of the package reposetory enabled. Check your /etc/apt/sources.list, you want something like
deb http://ftp.no.debian.org/debian/ stable main contrib

[ Parent | Reply to this comment ]

Posted by zigomatix (82.225.xx.xx) on Sun 21 May 2006 at 15:35
Wonderful. I'm definitely not an expert but I like my Debian Linux box. As I needed Java in my web browser I tried several sites which confused me even more. Using this one, I carried out the full installation. Thanks a lot to those skilled people managing the Debian administrator site (http://www.debian-administration.org/).

Patrick from Paris - France

[ Parent | Reply to this comment ]

Posted by ab4you (134.245.xx.xx) on Sat 15 Jul 2006 at 19:00
Hello,

I'm running debian sarge and followed your guide.
Here is the version info from apt-cache:

suns jre
Version: 1.5.0+update07

mozilla-firefox
Version: 1.0.4-2sarge4


I have also linked the plugin to the firefox as described. I verified it from the firefox via about:plugins:
application/x-java-vm Java Yes
application/x-java-applet Java Yes
application/x-java-applet;version=1.1 Java Yes
application/x-java-applet;version=1.1.1 Java Yes
application/x-java-applet;version=1.1.2 Java Yes
application/x-java-applet;version=1.1.3 Java Yes
application/x-java-applet;version=1.2 Java Yes
application/x-java-applet;version=1.2.1 Java Yes
application/x-java-applet;version=1.2.2 Java Yes
application/x-java-applet;version=1.3 Java Yes
application/x-java-applet;version=1.3.1 Java Yes
application/x-java-applet;version=1.4 Java Yes
application/x-java-applet;version=1.4.1 Java Yes
application/x-java-applet;version=1.4.2 Java Yes
application/x-java-applet;version=1.5 Java Yes
application/x-java-applet;jpi-version=1.5.0_07 Java Yes
application/x-java-bean Java Yes
application/x-java-bean;version=1.1 Java Yes
application/x-java-bean;version=1.1.1 Java Yes
application/x-java-bean;version=1.1.2 Java Yes
application/x-java-bean;version=1.1.3 Java Yes
application/x-java-bean;version=1.2 Java Yes
application/x-java-bean;version=1.2.1 Java Yes
application/x-java-bean;version=1.2.2 Java Yes
application/x-java-bean;version=1.3 Java Yes
application/x-java-bean;version=1.3.1 Java Yes
application/x-java-bean;version=1.4 Java Yes
application/x-java-bean;version=1.4.1 Java Yes
application/x-java-bean;version=1.4.2 Java Yes
application/x-java-bean;version=1.5 Java Yes
application/x-java-bean;jpi-version=1.5.0_07 Java

When I "Enable Java" via the "Preferences" and enter a webpage with java the browser crashes with a segmentation fault (no other error message given).
(example page: http://playgo.to/interactive/index.html
just follow the tutorial a few steps)
This happens on arbitrary sites that contain java.

Java itself works fine (e. g. with eclipse or running JARs).

Any ideas how to solve that problem?

Thanks in advance.
Sincerely yours
Daniel

[ Parent | Reply to this comment ]

Posted by Anonymous (15.195.xx.xx) on Mon 17 Jul 2006 at 10:52
does not work with grsecurity patch in kernel.
got killed.

[ Parent | Reply to this comment ]

Posted by currix (150.214.xx.xx) on Wed 23 Aug 2006 at 11:50
Thanks for the useful piece of information. Worked nicely for me.

[ Parent | Reply to this comment ]

Posted by Anonymous (213.97.xx.xx) on Thu 14 Sep 2006 at 10:08
Very useful article.
After install jdk I had an error when I was trying to print on a Swing application (like jEdit), the error was "No print service found". I solved this error installing cupsys-bsd (apt-get install cupsys-bsd).

[ Parent | Reply to this comment ]

Posted by campa (81.208.xx.xx) on Tue 26 Sep 2006 at 10:44
Hi, thank you for the useful article.
I follow above instructions, but still I have the follow problem :

-------------------------
java@www:~/jdk$ ls
jdk-1_5_0_08-linux-amd64.bin
java@www:~/jdk$ export TMPDIR=/home/java/temp/
java@www:~/jdk$ DEB_BUILD_GNU_TYPE=x86_64-linux fakeroot make-jpkg jdk-1_5_0_08-linux-amd64.bin
Creating temporary directory: /home/java/temp/make-jpkg.XXXXiAz0SJ
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

Detected product:
Java(TM) Software Development Kit (J2SDK)
Standard Edition, Version 1.5.0+update08
Sun Microsystems(TM), Inc.
Is this correct [Y/n]:
....
Do you agree to the above license terms? [yes or no]
yes
Unpacking...
Checksumming...
0
0
Extracting...
/home/java/jdk/jdk-1_5_0_08-linux-amd64.bin: line 412: 2118 Segmentation fault ./$outname

Done.

Testing extracted archive...
Invalid size (1 MB) of extracted archive. Probably you have not
enough free disc space in the temporary directory. Note: You can
specify an alternate directory by setting the environment variable
TMPDIR.

Aborted.
-------------------------
I have a planty of space on HD.

Anyone have idea to solve this ?
Thank in advance
Stefano

[ Parent | Reply to this comment ]

Posted by Anonymous (196.41.xx.xx) on Tue 10 Oct 2006 at 08:42
Worked Perfectly! Thanks

[ Parent | Reply to this comment ]

Posted by Anonymous (88.110.xx.xx) on Thu 23 Nov 2006 at 15:26
What strikes an end user is something which looks like a sort of deliberate perversity. Consider: we don't know the difference between a jre and a jdk. We download a program and try to run it. It blows up. We figure out finally that the blackdown version of java is no good, so we try to get the Sun package. Which one? There are half a dozen. OK, pick one, get it installed. Now what? The program gives us an error message saying it needs to be pointed at a jdk not a jre. Fine, where is the jdk? Do a search, there are half a dozen entries to do with pre and post install shell scripts. Are we supposed to run them? Read the documentation? Which documentation?

The point is, to just run a supposedly platform independent java application cannot possibly require one to become a moderately competent java programmer/sysadmin. But this is the way it looks from here.

And so, probably, I will be driven to taking my little program over to an XP installation, where it will just run. Absolutely the last thing I want to do, but I am running out of time. Presumably this is not exactly what Debian wants me to do either. Well, the solution is simple: make it possible for me to use java!

[ Parent | Reply to this comment ]

Posted by Anonymous (80.68.xx.xx) on Thu 23 Nov 2006 at 15:29
Fine comment. Probably better addressed at Sun than at this site though.

Sun is included in Debian now, as of sid + etch. Just apt-get it as you would any normal package.

[ Parent | Reply to this comment ]

Posted by Anonymous (213.112.xx.xx) on Sun 18 Feb 2007 at 12:21
It's great the Sun eventualy came around to release java under Gnu and making it possible for Debian to release a package.

I'm still on Sarge, and will probably stay for some time. Call me stupid if you want but I don't like .0-releases.

My question is: Are there any plans on releasing a "sarge"-package?

[ Parent | Reply to this comment ]

Posted by Anonymous (213.118.xx.xx) on Thu 7 Dec 2006 at 19:40
Thank you very much. I am a simple user and I need it explained step by step, and that's just what you did here. Great.
Polten

[ Parent | Reply to this comment ]

Posted by Anonymous (212.235.xx.xx) on Sun 14 Jan 2007 at 21:36
In case anyone is wondering which among many of the java* packages to choose:

sun-java5-bin - gives you java
sun-java5-jdk - gives the development kit

[ Parent | Reply to this comment ]

Posted by weeds86 (59.167.xx.xx) on Thu 1 Feb 2007 at 22:15
Hi Steve,

I am trying to follow your steps to install jdk-6-linux-i586.bin and here is the error:

"Creating temporary directory: /tmp/make-jpkg.LTukai4494
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 Debian build architecture: i386
Detected Debian GNU type: i386-linux

No matching plugin was found.
Removing temporary directory: done"

Any help is much appreciated

Cheers;)

[ Parent | Reply to this comment ]

Posted by Anonymous (85.81.xx.xx) on Sat 31 Mar 2007 at 15:51
either wait for an updated package, or edit /usr/share/java-package/sun-j2re.sh
add an entry in the first i386 section like this one

"jre-6-linux-i586.bin")
j2se_version=1.5
j2se_expected_min_size=16 # 16542512 bytes
found=true
;;

[ Parent | Reply to this comment ]

Posted by Anonymous (85.81.xx.xx) on Sat 31 Mar 2007 at 16:10
oh you can cheat even more,
assuming you have downloaded jre-6-linux-i586.bin,
as root:

cd /usr/share/java-package
cp -a sun-j2re1.5 sun-j2re1.6

edit sun-j2re1.6/install
first line: suffix=j2re1.6-sun

edit sun-j2re.sh
add this to the i386 section

"jre-6-linux-i586.bin")
j2se_version=1.6
j2se_expected_min_size=16 # 16542512 bytes
found=true
;;

save and exit

now change to your normal non-root user and cd to your home directory

fakeroot make-jpkg jre-6-linux-i586.bin

answer the simple questions as usual, and finally as root

dpkg -i sun-j2re1.6_1.6_i386.deb

:o)

[ Parent | Reply to this comment ]

Posted by Anonymous (85.81.xx.xx) on Sat 31 Mar 2007 at 16:21
dont forget to update-alternatives after the install...

update-alternatives --config firefox-javaplugin.so
update-alternatives --config mozilla-javaplugin.so

[ Parent | Reply to this comment ]

Posted by Anonymous (195.67.xx.xx) on Mon 20 Aug 2007 at 09:12
Thank you very much! It would have taken me hours to find this out...

[ Parent | Reply to this comment ]

Posted by Anonymous (189.130.xx.xx) on Tue 28 Aug 2007 at 00:57
THIS WORKS GREAT FOR THE JDK-6U2 TOO I was trying for hours and searching for information and I finally found this :D, thank you.

As simple as adding some lines and creating a folder :D, thank you very much...

[ Parent | Reply to this comment ]

Posted by Anonymous (84.108.xx.xx) on Sat 24 Apr 2010 at 20:38
Thanks.
the only solution that work for me (the new Java package: jre-6u20-linux-i586.bin but java-package still deal with "jre-6u"[0-9]"-linux-i586.bin")

[ Parent | Reply to this comment ]

Posted by Anonymous (211.227.xx.xx) on Tue 24 Apr 2007 at 14:03
sudo sh jdk-6-linux-i586.bin

[ Parent | Reply to this comment ]

Posted by Anonymous (192.62.xx.xx) on Fri 11 May 2007 at 19:02
Would anyone be able to help me with a Linkstation Pro? I have FreeLink installed and I get the following error.

Detected Debian build architecture: arm
Detected Debian GNU type: arm-linux-gnu

No matching plugin was found.
Removing temporary directory: done

What flavor of Java should I be using? Please help!

[ Parent | Reply to this comment ]

Posted by Anonymous (124.106.xx.xx) on Thu 31 May 2007 at 02:44
ive installed fakeroot and the java package already, but when i continue and do the step where i turn the bin file to a debian package (by typing fakeroot make-jpkg jre-1_5_0_03-linux-i586.bin on the terminal) i keep on getting this error message:

sh: gcc: command not found
dpkg-architecture: warning: Couldn't determine gcc system type, falling back to default (native compilation)


what does this mean and what should i do? thanks a lot!

[ Parent | Reply to this comment ]

Posted by Steve (80.68.xx.xx) on Thu 31 May 2007 at 10:06
[ View Steve's Scratchpad | View Weblogs ]

The error should be obvious: "gcc: command not found ". That means exactly what it says, that the system tried to run the command gcc but failed because it wasn't available.

To fix this you should install the gcc command, via:

apt-get install gcc

You probably would also want to run:

apt-get install build-essential

Steve

[ Parent | Reply to this comment ]

Posted by Anonymous (124.106.xx.xx) on Thu 31 May 2007 at 11:16
after typing the command " fakeroot make-jpkg jdk-6u1-linux-i586.bin" i had this message:

Creating temporary directory: /tmp/make-jpkg.XXXXlrvvWj
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

No matching plugin was found.

i dont quite get it. what plugin am i missing?


[ Parent | Reply to this comment ]

Posted by Anonymous (221.11.xx.xx) on Thu 19 Jul 2007 at 04:21
I run make-jpkg on ubuntu 7.04 like this:

DEB_BUILD_GNU_TYPE=i386-linux fakeroot make-jpkg jdk-6u2-linux-i586.bin

but I was failed:

Creating temporary directory: /tmp/make-jpkg.rVUiuW7956
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 Debian build architecture: i386
Detected Debian GNU type: i386-linux

No matching plugin was found.
Removing temporary directory: done

coundn't I install jdk1.6 by make-jpkg?

Amankwah

[ Parent | Reply to this comment ]

Posted by Steve (80.68.xx.xx) on Thu 19 Jul 2007 at 09:42
[ View Steve's Scratchpad | View Weblogs ]

I suggest you just apt-get install the java available to Ubuntu, rather than following this guide which is 2 years old.

Steve

[ Parent | Reply to this comment ]

Posted by Anonymous (220.247.xx.xx) on Wed 6 Feb 2008 at 12:47
Hi,

Fallow Sun instalation instruction http://java.sun.com/javase/6/webnotes/install/jdk/install-linux.h tml#install

You have to set Java veriables such as path, JAVA_HOME

Pushpakumara

[ Parent | Reply to this comment ]

Posted by Anonymous (70.69.xx.xx) on Fri 21 Sep 2007 at 22:23
Thks, followed your instructions and it worked great

[ Parent | Reply to this comment ]

Posted by Anonymous (72.185.xx.xx) on Sun 30 Sep 2007 at 05:49
This seems to be outdated.

The download I have is:
jre-6u2-linux-i586.bin

The error I get is:
~/Desktop$ fakeroot make-jpkg jre-6u2-linux-i586.bin
Creating temporary directory: /tmp/make-jpkg.JWmRve1713
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 Debian build architecture: i386
Detected Debian GNU type: i486-linux-gnu

No matching plugin was found.
Removing temporary directory: done
~/Desktop$

[ Parent | Reply to this comment ]

Posted by Anonymous (90.150.xx.xx) on Mon 8 Oct 2007 at 19:14
ln -s jre-6u2-linux-i586.bin jre-1_5_0_11-linux-i586.bin
fakeroot make-jpkg jre-1_5_0_11-linux-i586.bin

[ Parent | Reply to this comment ]

Posted by Anonymous (206.248.xx.xx) on Thu 11 Oct 2007 at 01:10
That worked fine for me

Thanks!

[ Parent | Reply to this comment ]

Posted by Anonymous (80.218.xx.xx) on Thu 17 Apr 2008 at 00:27
It is no longer valid for 1.6.0

[ Parent | Reply to this comment ]

Posted by Anonymous (86.63.xx.xx) on Sun 20 Apr 2008 at 02:28
Cant make it working with 1.6 i get this all time:

"fakeroot make-jpkg jre-6u10-beta-linux-i586.bin

Creating temporary directory: /tmp/make-jpkg.UhKnx28779
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 Debian build architecture: i386
Detected Debian GNU type: i486-linux-gnu

No matching plugin was found.
Removing temporary directory: done"

how to install it from now?

[ Parent | Reply to this comment ]

Posted by Anonymous (85.91.xx.xx) on Mon 16 Jun 2008 at 20:12
Rename the file to something else (like jre-6u9-linux-i586.bin)... make-jpkg tries to determine the jdk type and version by the file name (?!).

I successfully installed jdk 6u10 this way by renaming it to jdk-6-linux-i586.bin. However... eclipse dont want to accept this as valid JDK... Dont know why.

[ Parent | Reply to this comment ]

Posted by ramnet (63.20.xx.xx) on Mon 7 Jul 2008 at 20:59
Sun Java now ships with Debian non-free, making this article somewhat obsolete (still good for java 6 or debian oldies?)

apt-get sun-java5-jre

methinks it worth mentioning here.

Again, Sun Java ships inside Debian non-free

[ Parent | Reply to this comment ]

Posted by Anonymous (193.238.xx.xx) on Thu 7 Aug 2008 at 18:16
This article is still handy actually - I needed to use it for installing a particular Java package on my machine (1.6.0u10 beta 32bit on my 64bit Ubuntu) and others may also find it handy for similar reasons.

I'm not sure if this has been mentioned further up, as the comments are too long to read, however if you are getting the following error:

"No matching plugin was found."

Then this is probably because the .bin you are trying to make is not supported. You can get around this by copying an entry and editing it, in:

/usr/share/java-package/sun-j2sdk.sh

So for example, I couldn't do it as I'm trying to make a 32bit version on an AMD64 computer. So I copied the 32bit version from the i386|i486-linux-gnu section and put it in the amd64|x86_64-linux-gnu section, e.g.

"jdk-6u10-beta-linux-i586.bin") # SUPPORTED
j2se_version=1.6.0+update10${revision}
j2se_expected_min_size=68
found=true
;;

Hope that helps someone!

Stephen Pickett

[ Parent | Reply to this comment ]

Posted by Anonymous (202.148.xx.xx) on Thu 14 Aug 2008 at 06:19
This works great. Thanks!

[ Parent | Reply to this comment ]

Posted by Anonymous (136.186.xx.xx) on Mon 20 Oct 2008 at 10:18
Thanks for posting this workaround! Im upgrading to JDK6update10 right now!

[ Parent | Reply to this comment ]

Posted by dw31415 (216.17.xx.xx) on Sun 4 Jan 2009 at 19:05
I couldn't get this (fakeroot make-jpkg) method to work for me. I got the below error. I successfully did the "apt-get install sun-java5-jre" instead. "apt-get install sun-java6-jre" did not work (this may require "backport", but I don't understand what that means).

Can anyone suggest how to make either method (of installing Java6) work?

============================================
$ fakeroot make-jpkg jdk-6u11-linux-i586.bin
Creating temporary directory: /tmp/make-jpkg.OiVeX30195
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 Debian build architecture: i386
Detected Debian GNU type: i486-linux-gnu

No matching plugin was found.
Removing temporary directory: done
===================================================

System info:
# cat /etc/debian_version
lenny/sid

# dpkg-architecture
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
======================================================

deb http://http.us.debian.org/debian stable main contrib non-free

# apt-get upgrade
Reading package lists... Done
Building dependency tree... Done
The following packages have been kept back:
openssh-client openssh-server openvpn
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.

[ Parent | Reply to this comment ]

Posted by Anonymous (87.2.xx.xx) on Wed 15 Oct 2014 at 10:03
This helped me six year later while installing java 8

a big thanks to you and to the debian administration site

Pietro

[ Parent | Reply to this comment ]

Posted by Anonymous (64.208.xx.xx) on Tue 18 Nov 2008 at 13:34

Hi,

I am trying to install Sun Java SE 6 Update 10. I have just managed to create the Debian package after modifying /usr/share/java-package/sun-j2sdk.sh, but I got a lot of errors, like the following:

dpkg-shlibdeps: warning: couldn't find library libodbc.so needed by /tmp/make-jpkg.trccDgeIEC/install/usr/lib/j2sdk1.6-sun/jre/lib/i3 86/libJdbcOdbc.so (its RPATH is '/usr/lib/j2sdk1.6-sun/jre/lib/i386').
Note: libraries are not searched in other binary packages that do not have any shlibs or symbols file.
To help dpkg-shlibdeps find private libraries, you might need to set LD_LIBRARY_PATH.
dpkg-shlibdeps: warning: Can't extract name and version from library name `libjvm.so'
dpkg-shlibdeps: warning: Can't extract name and version from library name `libjvm.so'
dpkg-shlibdeps: warning: Can't extract name and version from library name `libjava.so'
dpkg-shlibdeps: warning: Can't extract name and version from library name `libjava.so'

Is this anything I should be worried about? If yes, how can I fix it?

Thank you,
Csabi

[ Parent | Reply to this comment ]

Posted by Anonymous (2002:0xx:0xx:0xxx:0xxx:0xxx:xx) on Thu 4 Dec 2008 at 16:34
Edit /usr/share/java-package/sun-j2re.sh and add this line to build a package from the latest JRE binary (jre-6u11-linux-x64.bin):

"jre-6u11-linux-x64.bin") # SUPPORTED
j2se_version=1.6.0+update${archive_name:6:1}${revision}
j2se_expected_min_size=16 # 16542512 bytes
found=true
;;

[ Parent | Reply to this comment ]

Posted by Anonymous (195.83.xx.xx) on Tue 7 Apr 2009 at 13:13
Problem, i couldn't install jdk 6 in my debian lenny.
In file: /usr/share/java-package/sun-j2sdk.sh
i've just added [0-9] in this case to permit installation of jdk>9, in my case jdk-6u13
"jdk-6u"[0-9][0-9]"-linux-i586.bin") # SUPPORTED
j2se_version=1.6.0+update${archive_name:6:1}${revision}
j2se_expected_min_size=130
found=true
;;

[ Parent | Reply to this comment ]

Posted by Anonymous (94.54.xx.xx) on Mon 27 Apr 2009 at 16:39
This page is quite old, in recent version lenny; all you have to do is:

$ apt-get update
$ apt-get install sun-java6-jdk
$ update-java-alternatives -s java-6-sun

that's all. To confirm:
$ java -version

Note: You need to have non-free software repositories in your sources.list file.

[ Parent | Reply to this comment ]

Posted by Anonymous (87.224.xx.xx) on Sun 28 Jun 2009 at 19:20
If your update version is greater than 9, you need to edit
jdk-6u"[0-9]"-linux-i586.bin
j2se_version=1.6.0+update${archive_name:6:1}${revision} to
jdk-6u"[0-9][0-9]"-linux-i586.bin
j2se_version=1.6.0+update${archive_name:6:2}${revision}

[ Parent | Reply to this comment ]

Posted by Anonymous (82.244.xx.xx) on Sat 1 May 2010 at 18:39
Looks like make-jpkg does not work anymore... Here is another solution: http://ju-n.net/properly-setting-up-sun-java-5-jdk-on-ubuntu-karm ic-lucid

[ Parent | Reply to this comment ]

Posted by Anonymous (71.240.xx.xx) on Wed 29 Dec 2010 at 22:41
When I implement this command: apt-get install fakeroot java-package
I get this answer: Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package java-package
Why is this? Thanks, John bzalto@gmail.com

[ Parent | Reply to this comment ]

Sign In

Username:

Password:

[Register|Advanced]

 

Flattr

 

Current Poll

What do you use for configuration management?








( 494 votes ~ 5 comments )