LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 02-08-2012, 08:29 AM   #1
cccc
Senior Member
 
Registered: Sep 2003
Distribution: Debian Squeeze / Wheezy
Posts: 1,601

Rep: Reputation: 45
install java on Wheezy


hi

Howto install java and java browser plugin (iceweasel) on Wheezy?

I cannot find sun java in the repos:
Code:
# apt-cache search sun-java
#
 
Old 02-08-2012, 09:41 AM   #2
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Rep: Reputation: 127Reputation: 127
There's no sun-java in testing; http://packages.qa.debian.org/s/sun-...5T091708Z.html

You can get it from their web site and follow their instructions how to install it, or you can use pinning and install one from the stable non-free repo, then configure default Java; http://wiki.debian.org/Java/Sun
 
Old 02-08-2012, 10:10 AM   #3
cccc
Senior Member
 
Registered: Sep 2003
Distribution: Debian Squeeze / Wheezy
Posts: 1,601

Original Poster
Rep: Reputation: 45
Thx, I've installed these squeeze packages:
Code:
# ls -la
total 35824
drwxr-xr-x  2 root   root       4096 Feb  8 14:41 .
drwxr-xr-x 37 wheezy wheezy     4096 Feb  8 14:47 ..
-rw-r--r--  1 root   root   30154572 Feb  8 14:36 sun-java6-bin_6.26-0squeeze1_i386.deb
-rw-r--r--  1 root   root    6512932 Feb  8 14:31 sun-java6-jre_6.26-0squeeze1_all.deb
-rw-r--r--  1 root   root       2012 Feb  8 14:39 sun-java6-plugin_6.26-0squeeze1_i386.deb
and it works well.
 
Old 02-08-2012, 10:18 AM   #4
rokytnji
Senior Member
 
Registered: Mar 2008
Location: Waaaaay out West Texas
Distribution: AntiX 13 , Various Puppys (MacPup,Slack0),MX-14
Posts: 2,131
Blog Entries: 12

Rep: Reputation: 639Reputation: 639Reputation: 639Reputation: 639Reputation: 639Reputation: 639
In case you want the latest java from Debian Sid. My /etc/apt/sources.list on my box looks like.


Code:
Repos:     Active apt sources in file: /etc/apt/sources.list
           deb http://ftp.us.debian.org/debian/ testing main contrib non-free
           deb http://security.debian.org/ testing/updates main contrib non-free
           deb http://www.debian-multimedia.org testing main non-free
           deb http://apt.progchild.de stable main
           deb http://liquorix.net/debian/ sid main
           deb http://ftp.belnet.be/mirror/liquorix.net/debian sid main
           Active apt sources in file: /etc/apt/sources.list.d/jitsi.list
           deb http://download.jitsi.org/deb unstable/
harry@Biker:~$ java -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode, sharing)
the script I run in terminal (it is a long one)

Code:
su -c 'echo "deb ftp://ftp.us.debian.org/debian/ sid main non-free">/etc/apt/sources.list.d/java.list && apt-get update && apt-get install -t unstable sun-java6-bin sun-java6-jre sun-java6-fonts sun-java6-plugin && rm -f -r /etc/apt/sources.list.d/java.list'
If you get an error like:

Code:
E: Dynamic MMap ran out of room. Please increase the size of APT::Cache-Limit.
you can fix that by editing your /etc/apt/apt.conf file and increasing the value of the APT::Cache-Limit line to 75000000 then save that file and then re-run the command.

the whole readout on my box looks like

Code:
Ign http://download.jitsi.org unstable/ InRelease                              
Get:1 http://liquorix.net sid InRelease [6,708 B]                              
Hit http://download.jitsi.org unstable/ Release.gpg                            
Hit http://download.jitsi.org unstable/ Release                                
Get:2 http://liquorix.net sid/main i386 Packages [2,349 B]                     
Ign http://liquorix.net sid/main TranslationIndex                              
Hit http://download.jitsi.org unstable/ Packages                               
Get:3 ftp://ftp.us.debian.org sid InRelease [190 kB]                           
Get:4 http://ftp.belnet.be sid InRelease [6,708 B]                             
Hit http://apt.progchild.de stable InRelease                                   
Get:5 http://security.debian.org testing/updates InRelease [87.8 kB]           
Hit http://apt.progchild.de stable/main i386 Packages                          
Ign http://liquorix.net sid/main Translation-en_US                             
Get:6 http://ftp.us.debian.org testing InRelease [179 kB]                      
Ign http://liquorix.net sid/main Translation-en                                
Ign http://apt.progchild.de stable/main TranslationIndex                       
Ign http://www.debian-multimedia.org testing InRelease                         
Get:7 http://ftp.belnet.be sid/main i386 Packages [2,349 B]                    
Get:8 http://security.debian.org testing/updates/main i386 Packages [14 B]     
Get:9 http://www.debian-multimedia.org testing Release.gpg [198 B]             
Ign http://ftp.belnet.be sid/main TranslationIndex                             
Get:10 http://security.debian.org testing/updates/contrib i386 Packages [14 B] 
Get:11 http://security.debian.org testing/updates/non-free i386 Packages [14 B]
Ign http://security.debian.org testing/updates/contrib TranslationIndex        
Ign http://security.debian.org testing/updates/main TranslationIndex           
Get:12 http://www.debian-multimedia.org testing Release [32.3 kB]              
Ign http://security.debian.org testing/updates/non-free TranslationIndex       
Ign http://download.jitsi.org unstable/ Translation-en_US                      
Get:13 http://www.debian-multimedia.org testing/main i386 Packages/DiffIndex [2,023 B]
Ign http://download.jitsi.org unstable/ Translation-en                         
Get:14 http://www.debian-multimedia.org testing/non-free i386 Packages/DiffIndex [2,023 B]
Get:15 http://www.debian-multimedia.org testing/main TranslationIndex [6 B]    
Ign http://www.debian-multimedia.org testing/non-free TranslationIndex         
Get:16 ftp://ftp.us.debian.org sid/main i386 Packages [5,705 kB]               
Get:17 http://ftp.us.debian.org testing/main i386 Packages/DiffIndex [2,038 B] 
Get:18 http://www.debian-multimedia.org testing/main i386 Packages [74.4 kB]   
Get:19 http://www.debian-multimedia.org testing/non-free i386 2012-01-22-1034.38.pdiff [1,610 B]
Get:20 http://www.debian-multimedia.org testing/non-free i386 2012-01-22-1034.38.pdiff [1,610 B]
Get:21 http://ftp.us.debian.org testing/contrib i386 Packages/DiffIndex [2,023 B]
Get:22 http://ftp.us.debian.org testing/non-free i386 Packages/DiffIndex [2,023 B]
Ign http://apt.progchild.de stable/main Translation-en_US                      
Ign http://ftp.us.debian.org testing/contrib TranslationIndex                  
Get:23 http://ftp.us.debian.org testing/main TranslationIndex [2,154 B]        
Ign http://ftp.us.debian.org testing/non-free TranslationIndex                 
Get:24 http://ftp.us.debian.org testing/main i386 Packages [5,464 kB]          
Ign http://security.debian.org testing/updates/contrib Translation-en_US       
Ign http://security.debian.org testing/updates/contrib Translation-en          
Ign http://security.debian.org testing/updates/main Translation-en_US          
Ign http://apt.progchild.de stable/main Translation-en                         
Ign http://security.debian.org testing/updates/main Translation-en             
Ign http://security.debian.org testing/updates/non-free Translation-en_US      
Ign http://security.debian.org testing/updates/non-free Translation-en         
Ign http://ftp.belnet.be sid/main Translation-en_US                            
Ign http://ftp.belnet.be sid/main Translation-en                               
Ign http://www.debian-multimedia.org testing/non-free Translation-en_US        
Ign http://www.debian-multimedia.org testing/non-free Translation-en           
Get:25 ftp://ftp.us.debian.org sid/non-free i386 Packages [78.4 kB]            
Get:26 ftp://ftp.us.debian.org sid/main TranslationIndex [2,154 B]             
Get:27 http://ftp.us.debian.org testing/contrib i386 Packages [40.8 kB]        
Get:28 http://ftp.us.debian.org testing/non-free i386 Packages [70.5 kB]       
Get:29 http://ftp.us.debian.org testing/contrib Translation-en [34.8 kB]       
Get:30 http://ftp.us.debian.org testing/main Translation-en [3,724 kB]         
Get:31 ftp://ftp.us.debian.org sid/non-free TranslationIndex               
Ign ftp://ftp.us.debian.org sid/non-free TranslationIndex                      
Get:32 ftp://ftp.us.debian.org sid/main Translation-en [3,879 kB]              
Get:33 http://ftp.us.debian.org testing/non-free Translation-en [62.5 kB]      
Ign http://ftp.us.debian.org testing/contrib Translation-en_US                 
Ign http://ftp.us.debian.org testing/non-free Translation-en_US                
Get:34 ftp://ftp.us.debian.org sid/non-free Translation-en_US                  
Get:35 ftp://ftp.us.debian.org sid/non-free Translation-en [69.6 kB]           
Get:36 ftp://ftp.us.debian.org sid/non-free Translation-en_US                  
Get:37 ftp://ftp.us.debian.org sid/non-free Translation-en_US                  
Get:38 ftp://ftp.us.debian.org sid/non-free Translation-en_US                  
Get:39 ftp://ftp.us.debian.org sid/non-free Translation-en_US                  
Ign ftp://ftp.us.debian.org sid/non-free Translation-en_US                     
Fetched 19.7 MB in 1min 9s (283 kB/s)                                          
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
sun-java6-fonts is already the newest version.
sun-java6-jre is already the newest version.
sun-java6-bin is already the newest version.
sun-java6-plugin is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 444 not upgraded.
harry@Biker:~$
Like I said. Just for info in case you are interested.
 
1 members found this post helpful.
Old 02-08-2012, 10:23 AM   #5
cccc
Senior Member
 
Registered: Sep 2003
Distribution: Debian Squeeze / Wheezy
Posts: 1,601

Original Poster
Rep: Reputation: 45
Yep, that's really interesting, thx a lot!
 
Old 02-08-2012, 11:42 AM   #6
gradinaruvasile
Member
 
Registered: Apr 2010
Location: Cluj, Romania
Distribution: Debian Testing
Posts: 477

Rep: Reputation: 100Reputation: 100
The official Java runtime in Debian (in fact all distros, because Oracle removed the free license) is OpenJDk. The browser plugin that goes with it is icedtea-plugin.
 
1 members found this post helpful.
Old 02-08-2012, 12:59 PM   #7
craigevil
Senior Member
 
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid
Posts: 4,732
Blog Entries: 12

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
If you are running stable you can install sun-java6-plugin.

If you are on testing or sid do:
apt-get install openjdk-6-jre icedtea-plugin

Or feel free to search the forum or Google for how to install Oracle Java.

Some more info :
New work on java-package : http://lists.debian.org/debian-java/.../msg00000.html
Debian User Forums • View topic - Info: Removal of sun-java6 from the archive : http://forums.debian.net/viewtopic.php?f=10&t=73650
Debian User Forums • View topic - [SOLVED] sun-java6-jdk has been removed from wheezy? : http://forums.debian.net/viewtopic.php?f=10&t=71969


Removal of sun-java6 from Debian - http://sylvestre.ledru.info/blog/syl...a6_from_debian
Quote:
As said in one of my previous blog post, we, Debian, were going to remove sun-java6 packages from the archive once critical security issues would come. It was supposed to happen sooner and later and here we are. The version 29 (see the #645881 Debian bug) of the Oracle proprietary JVM has been released. It fixes some critical issues but, because of the DLJ removal, Debian is no longer able to distribute it.

Unfortunately, we have no other choice than asking for a removal from the archive and promote the use of the openjdk 6 & 7.
The conclusion is:
apt-get --purge remove sun-java6-jre && apt-get install openjdk-7-jre

$ apt-cache policy icedtea-plugin
icedtea-plugin:
Installed: 1.1.3-2
Candidate: 1.1.3-2
Version table:
*** 1.1.3-2 0
500 http://ftp.us.debian.org/debian/ unstable/main i386 Packages
100 /var/lib/dpkg/status
$ java -version
java version "1.7.0_147-icedtea"
OpenJDK Runtime Environment (IcedTea7 2.0) (7~b147-2.0-1)
OpenJDK Client VM (build 21.0-b17, mixed mode, sharing)
 
1 members found this post helpful.
Old 02-08-2012, 01:34 PM   #8
EDDY1
Senior Member
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: DebianSqueeze, winsxp, wins7, Debian wheezy, LFS 7.2
Posts: 4,658

Rep: Reputation: 408Reputation: 408Reputation: 408Reputation: 408Reputation: 408
The Oracle java jre 7 works well.
If you have Google chrome on your system it'll complain about missing plugin with jre 6.
 
Old 02-09-2012, 12:42 AM   #9
gradinaruvasile
Member
 
Registered: Apr 2010
Location: Cluj, Romania
Distribution: Debian Testing
Posts: 477

Rep: Reputation: 100Reputation: 100
Be careful with openjdk 7. Some java apps run only with 6 series java.

Last edited by gradinaruvasile; 02-09-2012 at 02:38 AM.
 
1 members found this post helpful.
Old 03-04-2012, 12:26 PM   #10
cccc
Senior Member
 
Registered: Sep 2003
Distribution: Debian Squeeze / Wheezy
Posts: 1,601

Original Poster
Rep: Reputation: 45
Thx to Oracle, it seems to be a big java jungle!
 
Old 03-04-2012, 04:11 PM   #11
craigevil
Senior Member
 
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid
Posts: 4,732
Blog Entries: 12

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
java-package is back in Debian sid.

apt-get install java-package
download the .bin from Oracle
as root make-jpkg <java-binary-package-name>.bin
dpkg -i <created-package-name>.deb

Then symlink the plugin to the Mozilla/Firefox directory

as root do:
cd /usr/lib/mozilla/plugins
ln -s /usr/lib/jvm/j2re1.6-oracle/lib/i386/libnpjp2.so

Check Iceweasel/Firefox/Chrome etc that the plugin is installed.
about:plugins should show:
Quote:
Java(TM) Plug-in 1.6.0_31

File: /usr/lib/jvm/j2re1.6-oracle/lib/i386/libnpjp2.so
Update java alternatives so you are using Oracle's Java:
update-alternatives --config java

It should show something like:
Code:
# update-alternatives --config java
There are 2 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                           Priority   Status
------------------------------------------------------------
* 0            /usr/lib/jvm/java-6-openjdk-i386/jre/bin/java   1061      auto mode
  1            /usr/lib/jvm/j2re1.6-oracle/bin/java            314       manual mode
  2            /usr/lib/jvm/java-6-openjdk-i386/jre/bin/java   1061      manual mode

Press enter to keep the current choice[*], or type selection number: 1
update-alternatives: using /usr/lib/jvm/j2re1.6-oracle/bin/java to provide /usr/bin/java (java) in manual mode.
 
2 members found this post helpful.
Old 10-27-2012, 01:58 PM   #12
cccc
Senior Member
 
Registered: Sep 2003
Distribution: Debian Squeeze / Wheezy
Posts: 1,601

Original Poster
Rep: Reputation: 45
BTW has someone tried to install openjdk-6-jre or openjdk-7-jre on Wheezy?
Code:
# apt-cache search openjdk
java-package - Utility for creating Java Debian packages
freemind - Java Program for creating and viewing Mindmaps
icedtea-6-plugin - web browser plugin based on OpenJDK and IcedTea to execute Java applets
icedtea-7-plugin - web browser plugin based on OpenJDK and IcedTea to execute Java applets
default-jdk - Standard Java or Java compatible Development Kit
default-jdk-doc - Standard Java or Java compatible Development Kit (documentation)
default-jre - Standard Java or Java compatible Runtime
default-jre-headless - Standard Java or Java compatible Runtime (headless)
jtreg - Regression Test Harness for the OpenJDK platform
libreoffice - office productivity suite
icedtea-6-jre-cacao - Alternative JVM for OpenJDK, using Cacao
icedtea-6-jre-jamvm - Alternative JVM for OpenJDK, using JamVM
openjdk-6-dbg - Java runtime based on OpenJDK (debugging symbols)
openjdk-6-demo - Java runtime based on OpenJDK (demos and examples)
openjdk-6-doc - OpenJDK Development Kit (JDK) documentation
openjdk-6-jdk - OpenJDK Development Kit (JDK)
openjdk-6-jre - OpenJDK Java runtime, using Hotspot JIT
openjdk-6-jre-headless - OpenJDK Java runtime, using Hotspot JIT (headless)
openjdk-6-jre-lib - OpenJDK Java runtime (architecture independent libraries)
openjdk-6-jre-zero - Alternative JVM for OpenJDK, using Zero/Shark
openjdk-6-source - OpenJDK Development Kit (JDK) source files
icedtea-7-jre-cacao - Alternative JVM for OpenJDK, using Cacao
icedtea-7-jre-jamvm - Alternative JVM for OpenJDK, using JamVM
openjdk-7-dbg - Java runtime based on OpenJDK (debugging symbols)
openjdk-7-demo - Java runtime based on OpenJDK (demos and examples)
openjdk-7-doc - OpenJDK Development Kit (JDK) documentation
openjdk-7-jdk - OpenJDK Development Kit (JDK)
openjdk-7-jre - OpenJDK Java runtime, using Hotspot JIT
openjdk-7-jre-headless - OpenJDK Java runtime, using Hotspot JIT (headless)
openjdk-7-jre-lib - OpenJDK Java runtime (architecture independent libraries)
openjdk-7-jre-zero - Alternative JVM for OpenJDK, using Zero/Shark
openjdk-7-source - OpenJDK Development Kit (JDK) source files
uwsgi-app-integration-plugins - plugins for integration of uWSGI and application
uwsgi-plugin-jvm-openjdk-6 - Java plugin for uWSGI (OpenJDK 6)
uwsgi-plugin-jwsgi-openjdk-6 - JWSGI plugin for uWSGI (OpenJDK 6)

Last edited by cccc; 10-27-2012 at 07:06 PM.
 
Old 10-27-2012, 06:52 PM   #13
EDDY1
Senior Member
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: DebianSqueeze, winsxp, wins7, Debian wheezy, LFS 7.2
Posts: 4,658

Rep: Reputation: 408Reputation: 408Reputation: 408Reputation: 408Reputation: 408
I stick with the Oracle java which has to be updated manually.
I update when I can't play yahoo games.
 
Old 10-27-2012, 07:13 PM   #14
craigevil
Senior Member
 
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid
Posts: 4,732
Blog Entries: 12

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
$ java -version
java version "1.7.0_09"
Java(TM) SE Runtime Environment (build 1.7.0_09-b05)
Java HotSpot(TM) Client VM (build 23.5-b02, mixed mode)

$ apt-cache policy oracle-j2re1.7
oracle-j2re1.7:
Installed: 1.7.0+update9
Candidate: 1.7.0+update9

I stopped using Openjdk close to a year ago, back when Openjdk7 wanted to pull in half of Gnome.
 
Old 10-27-2012, 08:02 PM   #15
rokytnji
Senior Member
 
Registered: Mar 2008
Location: Waaaaay out West Texas
Distribution: AntiX 13 , Various Puppys (MacPup,Slack0),MX-14
Posts: 2,131
Blog Entries: 12

Rep: Reputation: 639Reputation: 639Reputation: 639Reputation: 639Reputation: 639Reputation: 639
Quote:
I stopped using Openjdk close to a year ago, back when Openjdk7 wanted to pull in half of Gnome.
Yeah, I know what you mean.

Code:
# apt-get install openjdk-7-jre
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libatasmart4 libdevmapper-event1.02.1 liblvm2app2.2 libqt4-gui libsgutils2-2
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  ca-certificates-java java-common libatk-wrapper-java-jni
  openjdk-7-jre-headless openjdk-7-jre-lib tzdata-java
Suggested packages:
  default-jre equivs icedtea-7-plugin libnss-mdns sun-java6-fonts
  fonts-ipafont-gothic fonts-ipafont-mincho ttf-wqy-microhei ttf-wqy-zenhei
  ttf-indic-fonts
Recommended packages:
  libgnome2-0 libgnomevfs2-0 ttf-dejavu-extra icedtea-7-jre-cacao
  icedtea-7-jre-jamvm
The following NEW packages will be installed:
  ca-certificates-java java-common libatk-wrapper-java-jni openjdk-7-jre
  openjdk-7-jre-headless openjdk-7-jre-lib tzdata-java
0 upgraded, 7 newly installed, 0 to remove and 24 not upgraded.
Need to get 33.6 MB/33.8 MB of archives.
After this operation, 95.9 MB of additional disk space will be used.

After this operation, 95.9 MB of additional disk space will be used.
> Aw, cmon man
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Java and Vuze installation on KDE Debian Wheezy sid infoslaw Linux - Newbie 11 12-28-2011 08:24 AM
[SOLVED] Wheezy-- no wireless eveningsky339 Debian 16 11-04-2011 01:21 PM
Selecting A Kernel During Wheezy Install carlosinfl Debian 3 10-12-2011 12:23 PM
[SOLVED] wheezy backports? cccc Debian 2 06-05-2011 08:37 PM
what directory is java install? what CMD determined where java is install? Thks. suse2166 Linux - Newbie 2 09-04-2005 08:24 PM


All times are GMT -5. The time now is 03:31 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration