Installing Sun's Java environment on Debian systems
Posted by Steve on Tue 17 May 2005 at 17:50
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.)
[ 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 ]
[ Parent | Reply to this comment ]
[ 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 ]
[ Parent | Reply to this comment ]
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 ]
[ Parent | Reply to this comment ]
Ubuntu Hoary/Hedgehog amd64 (64bit java, no plugin) and i386
Lukasz Nowak
PS. _Great_ site Steve!! :D
[ Parent | Reply to this comment ]
[ 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 ]
[ Parent | Reply to this comment ]
very nice article, no probes, no mistakes, exactly:)
good manual for beginers
[ Parent | Reply to this comment ]
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 ]
[ Parent | Reply to this comment ]
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 ]
$ 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 ]
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 ]
[ Parent | Reply to this comment ]
jo
[ Parent | Reply to this comment ]
Running Ubunty Breezy on AMD64. "No matching plugin was found."
Any ideas?
Vinod.
[ Parent | Reply to this comment ]
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 ]
$ 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 ]
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 ]
Thank you.
[ Parent | Reply to this comment ]
Works perfect. Thank you very much :)
[ Parent | Reply to this comment ]
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 ]
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 ]
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
Thanks!
grog_
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
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 ]
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 ]
[ 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 ]
[ Parent | Reply to this comment ]
[ 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 ]
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 ]
[ 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 ]
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 ]
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 ]
Adam
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
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 ]
[ 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 ]
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 ]
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 ]
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 ]
[ 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 ]
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
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 ]
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
very clear explaination good work. Even my grandmother could start using debian
if there were such good explained articles...
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
I was looking for a howto on this to get azureus running...works perfectly:)
Thanks!
[ Parent | Reply to this comment ]
Any idea?
Thanks, Alessandro
[ Parent | Reply to this comment ]
[ 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 ]
I solved with blackdown java :-)
Bye, Alessandro
[ Parent | Reply to this comment ]
cheers :-)
[ Parent | Reply to this comment ]
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 ]
[ Parent | Reply to this comment ]
Thankyou very much. That was an extremely credible explanation.
:)
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
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 ]
[ 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?
[ Parent | Reply to this comment ]
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 ]
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 ]
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 ]
----------------------------------------------------------------- ----------
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 ]
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 ]
[ 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.
[ Parent | Reply to this comment ]
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 ]
[ 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.
[ Parent | Reply to this comment ]
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 ]
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 ]
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
Thank for your faq
Stéphane
[ Parent | Reply to this comment ]
_________________________________________________________________ ______
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 ]
[ 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.
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
S.K.
[ Parent | Reply to this comment ]
*
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 ]
[ 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.
[ Parent | Reply to this comment ]
<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 ]
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 ]
[ Parent | Reply to this comment ]
deb http://ftp.no.debian.org/debian/ stable main contrib
[ Parent | Reply to this comment ]
Patrick from Paris - France
[ Parent | Reply to this comment ]
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 ]
got killed.
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
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 ]
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 ]
[ Parent | Reply to this comment ]
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 ]
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 ]
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 ]
Polten
[ Parent | Reply to this comment ]
sun-java5-bin - gives you java
sun-java5-jdk - gives the development kit
[ Parent | Reply to this comment ]
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 ]
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 ]
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 ]
update-alternatives --config firefox-javaplugin.so
update-alternatives --config mozilla-javaplugin.so
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
As simple as adding some lines and creating a folder :D, thank you very much...
[ Parent | Reply to this comment ]
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 ]
[ Parent | Reply to this comment ]
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 ]
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 ]
[ Send Message | 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
[ Parent | Reply to this comment ]
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 ]
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 ]
[ Send Message | 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.
[ Parent | Reply to this comment ]
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 ]
[ Parent | Reply to this comment ]
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 ]
fakeroot make-jpkg jre-1_5_0_11-linux-i586.bin
[ Parent | Reply to this comment ]
Thanks!
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
"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 ]
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 ]
apt-get sun-java5-jre
methinks it worth mentioning here.
Again, Sun Java ships inside Debian non-free
[ Parent | Reply to this comment ]
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 ]
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
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 ]
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 ]
"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 ]
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 ]
$ 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 ]
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 ]
[ Parent | Reply to this comment ]
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 ]
Home is not neccessarily in /home/username, but it should be more easily and certainly in ~/ or $HOME/.
[ Parent | Reply to this comment ]