1

Followed debian Java Sun wiki, and later 1[open jsk 7 ]2 which has a note on installing 6 : link to java 7 on debian

aptitude install sun-java6-jdk

No candidate version found for sun-java6-jdk No candidate version found for sun-java6-jdk No packages will be installed, upgraded, or removed. 0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Need to get 0 B of archives. After unpacking 0 B will be used.

Then I downloaded the Java sdk bin file (should i download the rpm bin?)

Opened terminal again, su ed and typed make but get error no make! How do I get make? How do I install Java 6 sdk?

Update:

bins are just scripts with attachments. They are installer.

Just :

cd to folder su (enter password) chmod 755 xxx.bin ./xx.bin

This executes the script and it extracts to a folder jdk1.6.0_45 in the current folder. Now what?

  • when i type make, error msg is 'bash: make: command not found ' – tgkprog Aug 10 '13 at 18:41
  • 1
    seems you don't have make and maybe no (g)cc installed. You might run apt-get install make gcc to install make before running it – Valentin Bajrami Aug 10 '13 at 18:49
  • thanks executing that earlier tried to get make from software add remove – tgkprog Aug 10 '13 at 18:57
3

Looks like it was a newbie question, bins are just scripts with attachments (More precisely 'bins' are binary packages, as opposed to source packages. This includes stuff you install via apt-get (which is compiled by debian) and oracle javas (which are compiled by oracle for either 32 or 64 bit linux) The aha moment for me was that i do not need to run them as a parameter to another command but they are self running scripts/ like on mac - you can untar or jar extract them}.

make-jpkg needs to be installed, not a typo! See https://wiki.debian.org/JavaPackage

New Debian install so had to get some good to have's like

apt-get install make gcc

(gcc not required for java but I expect I will need it in the future when I try to build a c++ a

and

apt-get install java-package

(needed this)

Make the package

make-jpkg jdk-6u45-linux-x64.bin

And install it

dpkg -i oracle-j2sdk1.7_1.7.0+update2_amd64.deb

Choose which version should be the default :

sudo update-java-alternatives -s j2sdk1.7-oracle

where 'j2sdk1.7-oracle' is the folder where it was installed in your installation .

I had su ed before make-jpkg jdk-6u45-linux-x64.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 jdk-6u45-linux-x64.bin

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

Got to love linux - looking over your shoulder.

After fakeroot

Gave the command again. Response :

Detected Debian build architecture: amd64 Detected Debian GNU type: x86_64-linux-gnu

Detected product: Java(TM) Development Kit (JDK) Standard Edition, Version 1.6.0+update45 Oracle(TM), Inc. Is this correct [Y/n]:

Press y ; Then took a few minutes unpacking and repackaging, a lot of warnings but worked.

Finally prompted me to run command, as root :

dpkg -i oracle-j2sdk1.6_1.6.0+update45_amd64.deb

After doing that java version gives me the correct version - sdk 1.6_45 :

java -version

java version "1.6.0_45" Java(TM) SE Runtime Environment (build 1.6.0_45-b06) Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)

  • 1
    'bins' are not "just scripts with attachments" -- they're binary packages, as opposed to source packages. This includes stuff you install via apt-get (which is compiled by debian) and oracle javas (which are compiled by oracle for either 32 or 64 bit linux). I'm dubious that this requires make and gcc: are they prereqs of java-package? They certainly won't actually be used in this process. +1 for the general tip about java-package and hopefully you correct/edit this. You do realize this installs java 7, not java 6? – goldilocks Aug 11 '13 at 8:07
  • @goldilocks yes your right i just copied that from the wiki. Now its the real commands for java 6 current version. thanks so much for pointing them out. – tgkprog Aug 11 '13 at 18:50
1

Why don't you install Oracle Java JDK 7 which is newer version ?

To intall Java Runtime Environment on Debian, Ubuntu, etc.

apt-get install openjdk-7-jre

To intall package to developing programs using Java on Debian, Ubuntu, etc.

apt-get install openjdk-7-jdk

Source: http://namhuy.net/1195/how-to-install-oracle-java-jdk-7.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.