View Full Version : HOW-TO: Building your own Java 1.5 package
humanity_to_others
October 15th, 2005, 03:50 PM
This How-to is based on that (http://ubuntuforums.org/showthread.php?t=70428) and that thread (http://ubuntuforums.org/showthread.php?t=76702) and this page (http://serios.net/content/debian/java/with-java-package.php)
Download JRE 5.0 Update 6 (http://java.sun.com/j2se/1.5.0/download.jsp)
sudo apt-get install fakeroot java-package java-common
fakeroot make-jpkg jre-1_5_0_06-linux-i586.bin
sudo dpkg -i sun-j2re1.5_1.5.0+update06_i386.deb
sudo update-alternatives --config java
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)
You can try java at this page (http://serios.net/content/applets/viewinfoawt.php)
It's important to notice I was presented with the following question when I executed the update-alternatives command line (I installed j2sdk):There are 3 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.5-sun/bin/javaThe user should select the one that has the word SUN on it. In my case, number 3. ;) Good luck.
Thanks for your effort, but you should know this information is already available on the wiki (https://wiki.ubuntu.com/RestrictedFormats#java).
graphfixpunk,
The java-package package is located in the multiverse section on Ubuntu, which is by default not present (not active at least) in one's sources.list
So edit your /etc/apt/sources.list, add the multiverse section (or just uncomment the commented-away lines specifying them) and then run apt-get update
And it is unnecessary to explicitly specify fakeroot and java-common to be installed because:
- fakeroot is a dependency of java-package and will thus be installed when installing java-package
- java-common is provided by the package that is generated by make-jpkg.
For highly detailed installation instructions see the instructions I have written:
Ubuntu Java JRE/JDK installation with java-package (http://wiki.serios.net/wiki/Ubuntu_Java_JRE/JDK_installation_with_java-package) - this is essentially mentioned already in the initial post of this thread yes, but I have now created separate instructions for Ubuntu as it was a bit cluttered to maintain both Debian and Ubuntu instructions in the same document.
And non-repo way howto: http://ubuntuforums.org/showthread.php?t=76754
geearf
October 16th, 2005, 01:41 PM
thanks for this howto, very usefull I think.
RastaMahata
October 16th, 2005, 03:07 PM
great howto. :P The easiest java install so far :D
RastaMahata
October 16th, 2005, 07:36 PM
It's important to notice I was presented with the following question when I executed the update-alternatives command line (I installed j2sdk):There are 3 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.5-sun/bin/javaThe user should select the one that has the word SUN on it. In my case, number 3. ;) Good luck.
Samuel
October 16th, 2005, 09:35 PM
thankyou, worked a charm :D
Joey French
October 16th, 2005, 09:48 PM
Awesome. Worked like a charm!
garnertr
October 16th, 2005, 10:52 PM
All that I can say is THANK YOU SO MUCH. I've been tearing my head out trying to get JAVA installed and you did it thank you, thank you, thank you!!!
Book-marked this page for future reference...
:)
m9dhatter
October 17th, 2005, 02:15 AM
i cant seem to find the java-package debs... where do i find it?
nevermind. i added multiverse to my sources.lst
Roybotnik
October 20th, 2005, 01:32 AM
Thanks for this guide. Easiest java install I would have to say.
squibbon
October 20th, 2005, 03:39 AM
done everything but when i...
eric@UbuntuHR3:~/Desktop$ java -version
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object
BUT NOW i can run LimeWire. What happen? =)
blu.gecko
October 20th, 2005, 06:57 PM
im not sure what went wrong here but this what I got in the fake root section
root@ubuntu:/home/blu # fakeroot make-jpkg /home/blu/jdk-1_5_0_05-linux-i586.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 /home/blu/jdk-1_5_0_05-linux-i586.bin
which will allow no damage to be done to your system files and
still permit the Java distribution to successfully extract.
Aborting.
eh?
blu.gecko
October 20th, 2005, 07:11 PM
Ok, dont scorn me Im still learning, but I figured out the reason I couldnt do it is becuse I was trying to do it under a root terminal (that should have been obvious)
but I have the file compiled and it is the newest version, so if anyone wants it, I have the latest version and I will post it to my site if anyone wants to download it.
thanks for all the help
mmills
fishfork
October 21st, 2005, 04:16 PM
This How-to is based on that (http://ubuntuforums.org/showthread.php?t=70428) and that thread (http://ubuntuforums.org/showthread.php?t=76702) and this page (http://serios.net/content/debian/java/with-java-package.php)
Thanks for your effort, but you should know this information is already available on the wiki (https://wiki.ubuntu.com/RestrictedFormats#java).
blu.gecko
October 21st, 2005, 06:00 PM
can you route me to the how-to to change a bin file into a deb file, I have the pro version of a application the a friend of mine just gave to me but I want to make it into a ubuntu ver like I did with the java bin file, if it is at all possible.
blu.gecko:rolleyes:
tomach
October 22nd, 2005, 05:02 PM
hmmm i have a question where should i extract java file and next : after compilation it will creat some folders , should i copied for ex everhging from jav.../bin to usr/bin ?? end so on...?
i know it doesnt matter cos java will work anyway but i wanna have order in my linux and professional view;)
jonrkc
October 23rd, 2005, 01:38 PM
I use Ubuntu Hoary 5.04.
I followed the instructions in this thread, and received the messages about Java being installed, and they read just as in the example at the top of this thread. But Firefox would not recognize the Java plugin even though I placed it in the plugin directory in Firefox, in ~/.mozilla/firefox/plugins, in all the other mozilla libraries I could find...
The test always comes up as plugin missing, with the box to "download the plugin," which leads only to the home page of Netscape 8.0!
It used to be fairly easy to install Java; you just downloaded it from Sun, said "yes" to their twenty-page terms of use, installed it, copied the plugin to the Firefox plugin directory, and it WORKED.
Why, I wonder, is it so difficult now--and why has it worked for others here right off the bat, but not for me, following the same instructions?
I also went to the Wiki page and followed the instructions there.
I did these things at least five times with always the same results.
I really don't WANT Java, but I need it if I'm going to run OpenOffice.org version 2.0, which won't even do simple customizing without Java, unlike previous editions which didn't need Java for much of anything.
If there was another office suite half as good, that didn't require Java, I'd just go to it, but there isn't.
I don't know what to ask, since I followed these instructions to the letter and Java was definitely installed but won't work. There was no reference here to an environment variable for Java; is that perhaps what's needed? If so, what variable is it, so that I could issue it with the path to the Java files?
Any suggestions gratefully received!
jonrkc
October 23rd, 2005, 11:37 PM
Just to let you know I did get Java to work, by following these instructions and piling a bunch of experimentation on top. It took me about ten tries altogether, but finally I have the latest JRE working, both in Firefox and, what I was most worried about, in OpenOffice.org ver. 2.0.
I suspect the crucial thing I had to do for my own setup was to set CLASSPATH to the directory containing the JRE files. But I can't swear to it. I changed too many variables too many times to know what finally did the trick.
Thanks for all the suggestions in this thread (and some others!) though. Without those I doubt that I'd have it going yet.
[censored]
October 25th, 2005, 03:18 PM
That's all pretty simple. But isn't there more to it? Don't we have to set up java environment variables like $JAVAHOME etc?
ishtvan222
November 14th, 2005, 11:28 PM
Can i take the .deb package that this makes and install it on a fresh install of ubuntu that is not connected to the internet? Or do I have to have extra packages to run it?
Thanks
ishtvan222
November 15th, 2005, 07:43 PM
Looks like it works. Thanks.
graphfixpunk
November 24th, 2005, 03:32 PM
whenever I
sudo apt-get install fakeroot java-package java-common
it gives me
patrick@ubuntu:~$ sudo apt-get install fakeroot java-package
Reading package lists... Done
Building dependency tree... Done
E: Couldn't find package java-package
anybody know how to fix this im on breezy badger 5.10 right now
dastrike
November 25th, 2005, 01:22 AM
graphfixpunk,
The java-package package is located in the multiverse section on Ubuntu, which is by default not present (not active at least) in one's sources.list
So edit your /etc/apt/sources.list, add the multiverse section (or just uncomment the commented-away lines specifying them) and then run apt-get update
And it is unnecessary to explicitly specify fakeroot and java-common to be installed because:
- fakeroot is a dependency of java-package and will thus be installed when installing java-package
- java-common is provided by the package that is generated by make-jpkg.
For highly detailed installation instructions see the instructions I have written:
Ubuntu Java JRE/JDK installation with java-package (http://wiki.serios.net/wiki/Ubuntu_Java_JRE/JDK_installation_with_java-package) - this is essentially mentioned already in the initial post of this thread yes, but I have now created separate instructions for Ubuntu as it was a bit cluttered to maintain both Debian and Ubuntu instructions in the same document.
fourhead
November 28th, 2005, 09:57 AM
HELP!
I found so many how-tos on how to install Java, but they all say you have to apt-get install java-package - but there's no "java-package" in my apt-get. I have all the repos enabled that the default sources.list had (on 5.10). What am I missing? i want to install IBM JDK on PPC and AMD64.
Tom
humanity_to_others
December 1st, 2005, 03:54 AM
Updated for new java and integrated with your useful tips thanks all.
eliman
December 10th, 2005, 02:52 AM
Fantastic! This solved my Java issues with zero fuss. Thanks!
btdown
December 13th, 2005, 09:24 AM
Thank you for the update instructions for update 6! Very helpful!
BT
newbun2
December 16th, 2005, 10:57 AM
Fourhead, copy this sources.list and it should work..
http://www.psychocats.net/linux/sources.php
fwendt
February 9th, 2006, 12:59 PM
Please note that the suggestions above is splendid but not enough to get default java applications like ant to run with the specified jvm/jre/sdk. This is because of two reasons:
1. You should also set at the other java related alternatives in /etc/alternatives, namely:
jar
jarsigner
java
javac
javadoc
javah
javap
javaws
Use update-alternatives --config <tool-here>
2. The make-jpkg does NOT update /etc/jvm braking packages such as ant, which will still try to use the jvm first listed in this file (which most commonly is gcj). I found this out while running ant and junit.
/etc/jvm:# This file defines the default system JVM search order. Each
# JVM should list their JAVA_HOME compatible directory in this file.
# The default system JVM is the first one available from top to
# bottom.
/usr/lib/jvm/java-gcj
/usr
franonubu
February 22nd, 2006, 10:10 PM
Helloo,
I am vey newbie through linux and moreover ubuntu.
so I have downloaded the jre..., on the Desktop. Then wrote the first commnad but it seems some problem are happening.
Do you have an idea how to fix this things?
Here is the message.
sudo apt-get install fakeroot java-package java-common
Reading package lists... Done
Building dependency tree... Done
fakeroot is already the newest version.
W: Couldn't stat source package list http://packages.freecontrib.org breezy/free Packages (/var/lib/apt/lists/packages.freecontrib.org_ubuntu_plf_dists_breezy_f ree_binary-amd64_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://packages.freecontrib.org breezy/non-free Packages (/var/lib/apt/lists/packages.freecontrib.org_ubuntu_plf_dists_breezy_n on-free_binary-amd64_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list ftp://ftp.free.fr breezy/free Packages (/var/lib/apt/lists/ftp.free.fr_pub_Distributions%5fLinux_plf_ubuntu_p lf_dists_breezy_free_binary-amd64_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list ftp://ftp.free.fr breezy/non-free Packages (/var/lib/apt/lists/ftp.free.fr_pub_Distributions%5fLinux_plf_ubuntu_p lf_dists_breezy_non-free_binary-amd64_Packages) - stat (2 No such file or directory)
W: You may want to run apt-get update to correct these problems
E: Couldn't find package java-package
geearf
February 28th, 2006, 09:27 AM
Please note that the suggestions above is splendid but not enough to get default java applications like ant to run with the specified jvm/jre/sdk. This is because of two reasons:
Thanks for this post, it is very interesting.
daredevil
March 1st, 2006, 10:39 AM
this also can be useful
http://www.debian-administration.org/articles/142
Tom^
March 8th, 2006, 05:34 AM
How to install IBM java?
make-jpkg ibm-java2-jre-50-linux-i386.tgz
Creating temporary directory: /tmp/make-jpkg.XXXXk6F4WO
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.
Removing temporary directory: done
WelterPelter
March 8th, 2006, 05:45 AM
Helloo,
I am vey newbie through linux and moreover ubuntu.
so I have downloaded the jre..., on the Desktop. Then wrote the first commnad but it seems some problem are happening.
Do you have an idea how to fix this things?
Here is the message.
sudo apt-get install fakeroot java-package java-common
Reading package lists... Done
Building dependency tree... Done
fakeroot is already the newest version.
W: Couldn't stat source package list http://packages.freecontrib.org breezy/free Packages (/var/lib/apt/lists/packages.freecontrib.org_ubuntu_plf_dists_breezy_f ree_binary-amd64_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://packages.freecontrib.org breezy/non-free Packages (/var/lib/apt/lists/packages.freecontrib.org_ubuntu_plf_dists_breezy_n on-free_binary-amd64_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list ftp://ftp.free.fr breezy/free Packages (/var/lib/apt/lists/ftp.free.fr_pub_Distributions%5fLinux_plf_ubuntu_p lf_dists_breezy_free_binary-amd64_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list ftp://ftp.free.fr breezy/non-free Packages (/var/lib/apt/lists/ftp.free.fr_pub_Distributions%5fLinux_plf_ubuntu_p lf_dists_breezy_non-free_binary-amd64_Packages) - stat (2 No such file or directory)
W: You may want to run apt-get update to correct these problems
E: Couldn't find package java-package
You have probably figured this out in the week since your post, but in case you haven't, this is a problem with synaptic. Your sources list is having some trouble. Have you tried running 'sudo apt-get update'?
cab1024
March 23rd, 2006, 01:13 AM
My errors:
chuck@saltydog:~$ sudo apt-get install fakeroot java-package java-common
Password:
Reading package lists... Done
Building dependency tree... Done
java-common is already the newest version.
The following extra packages will be installed:
binutils debconf-utils debhelper dpkg-dev gettext html2text intltool-debian
make po-debconf
Suggested packages:
binutils-doc dh-make debian-keyring cvs gettext-doc
Recommended packages:
gcc c-compiler curl libmail-sendmail-perl libcompress-zlib-perl
The following NEW packages will be installed:
binutils debconf-utils debhelper dpkg-dev fakeroot gettext html2text
intltool-debian java-package make po-debconf
0 upgraded, 11 newly installed, 0 to remove and 0 not upgraded.
Need to get 21.3kB/4542kB of archives.
After unpacking 16.1MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://us.archive.ubuntu.com breezy/multiverse java-package 0.26 [21.3kB]
Fetched 21.3kB in 0s (41.3kB/s)
which means I've already sort of installed the latest Java, but more remains to be installed. then lots of unpacking, followed by:
Setting up java-package (0.26) ...
chuck@saltydog:~$ java version "1.5.0_06"
Exception in thread "main" java.lang.NoClassDefFoundError: version
chuck@saltydog:~$ Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
bash: syntax error near unexpected token `TM'
chuck@saltydog:~$ Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)
Any idea how to make this work? I'm still getting the plug-in link in Firefox. I should note that I have done the Firefox 1.5.1 installation, so maybe what's needed is not getting copied to the right Firefox? But I think the instruction page had me delelte the original 1.07 Firefox.
bigken
April 9th, 2006, 04:55 AM
Worked for me strait forward no hassle guide thx :p
clantoncs
December 21st, 2006, 09:32 AM
Piece of cake! Thanks for this!
It's important to note, though, that the new jre download page is here:
http://www.java.com/en/download/linux_manual.jsp
Also, this is the tenth update, so if you follow this tutorial you should change all the "06"s to "10"s.
Awesome tutorial!
navneeth
February 3rd, 2007, 10:46 AM
Thanks for this HOW-TO. It works!
jackn
April 26th, 2008, 04:31 AM
Thank you, humanity-to-others.
When I tried to follow the instructions, the first download seemed to work well,
When, however, I tried to run the second command, I got an error message::~$ fakeroot make-jpkg jre-1_5_0_06-linux-i586.bin
Error: The file "jre-1_5_0_06-linux-i586.bin" does not exist.
Indeed, a 'find' came un with nothing.
Can anyone please help?
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.