Page 4 of 4

Re: Howto install Oracle's Java on LMDE/Debian

Posted: Mon May 28, 2012 9:44 am
by mintybits
äxl wrote:mintybits, I don't want to teach you but maybe you could give this a read: http://www.gnu.org/philosophy/free-sw.html
Thanks. I read as far as this before gagging :wink: :
When users don't control the program, the program controls the users. The developer controls the program, and through it controls the users. This nonfree or “proprietary” program is therefore an instrument of unjust power.
I think the only crusade linux folks should engage in is pursuit of the best software (functionality & reliability). I favour Oracle Java as the Mint default because it is the best.

Re: Howto install Oracle's Java on LMDE/Debian

Posted: Mon May 28, 2012 10:10 am
by äxl
mintybits wrote:Thanks. I read as far as this before gagging :wink: :
I don't know what's to gag about the freedom of choice?
I think the only crusade linux folks should engage in is pursuit of the best software (functionality & reliability). I favour Oracle Java as the Mint default because it is the best.
And btw: You're crusading. ;)

Re: Howto install Oracle's Java on LMDE/Debian

Posted: Mon May 28, 2012 2:36 pm
by craigevil
äxl wrote:I guess I can remove whatever I want because I still have Gnome and Cinnamon installed (although not using them).
Depends on what is more important for you, craigevil. "Half of Gnome" or an insecure OpenJDK. ;)
From stability and performance point of view I can't notice a difference between Oracle and Open.
Openjdk6 is not insecure if it was it would not be in the Debian repos. Just like sun-java-6 is still in the Stable Debian repo because it is patched. And Gnome is a steaming pile of manure I would never install it.

As for the person complaining that Oracle's Java is not in the Mint/LMDE repos, Oracle's license does not permit redistribution. If you want Oracle's java you must go to their website and download it. Even the almighty Ubuntu had to remove it from their repos.

I would also suggest you read:
Open-source software - Wikipedia, the free encyclopedia - https://en.wikipedia.org/wiki/Open-source_software
Debian Social Contract - http://www.debian.org/social_contract#guidelines
OpenJDK FAQ - http://openjdk.java.net/faq/

There is a big difference between free to use and 'free'.

Re: Howto install Oracle's Java on LMDE/Debian

Posted: Mon May 28, 2012 2:59 pm
by mintybits
craigevil wrote:As for the person complaining that Oracle's Java is not in the Mint/LMDE repos, Oracle's license does not permit redistribution. If you want Oracle's java you must go to their website and download it. Even the almighty Ubuntu had to remove it from their repos.
I think that was me. It's fair enough if Oracle's license prevents it. Does this extend to not making it an option in the Software Manager? Or at least having a downloadable installer that makes you tick the license agreement before it installs, like Windows does? I do not understand why Windows manages Oracle Java installation and updates seemlessly but Ubuntu/Mint does not.

Re: Howto install Oracle's Java on LMDE/Debian

Posted: Tue Jun 12, 2012 3:36 pm
by craigevil
Oracle released updated versions of both Java 6 and Java 7. Please download and install the new versions as they patched several security holes.

$ java -version
java version "1.7.0_05"
Java(TM) SE Runtime Environment (build 1.7.0_05-b05)
Java HotSpot(TM) Client VM (build 23.1-b03, mixed mode)

Re: Howto install Oracle's Java on LMDE/Debian

Posted: Tue Jul 03, 2012 8:49 pm
by zerozero

Code: Select all

deb-kde zerozero # dpkg -i oracle-j2re1.7_1.7.0+update5_amd64.deb
(Reading database ... 138319 files and directories currently installed.)
Preparing to replace oracle-j2re1.7 1.7.0+update4 (using oracle-j2re1.7_1.7.0+update5_amd64.deb) ...
Unpacking replacement oracle-j2re1.7 ...
Setting up oracle-j2re1.7 (1.7.0+update5) ...
deb-kde zerozero # 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-amd64/jre/bin/java   1061      auto mode
* 1            /usr/lib/jvm/j2re1.7-oracle/bin/java             316       manual mode
  2            /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java   1061      manual mode

Press enter to keep the current choice[*], or type selection number: 
deb-kde zerozero # update-alternatives --config javaws
There are 2 choices for the alternative javaws (providing /usr/bin/javaws).

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

Press enter to keep the current choice[*], or type selection number: 
deb-kde zerozero # update-alternatives --config javac
update-alternatives: error: no alternatives for javac.
deb-kde zerozero # exit
exit
zerozero@deb-kde ~ $ java -version
java version "1.7.0_05"
Java(TM) SE Runtime Environment (build 1.7.0_05-b05)
Java HotSpot(TM) 64-Bit Server VM (build 23.1-b03, mixed mode)
zerozero@deb-kde ~ $ 

Re: Howto install Oracle's Java on LMDE/Debian

Posted: Wed Jul 04, 2012 2:14 am
by craigevil

Code: Select all

# 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.7-oracle/bin/java            316       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: 
$ java -version
java version "1.7.0_05"
Java(TM) SE Runtime Environment (build 1.7.0_05-b05)
Java HotSpot(TM) Client VM (build 23.1-b03, mixed mode)

Firefox about:plugins
Java(TM) Plug-in 1.7.0_05
File: /usr/lib/jvm/j2re1.7-oracle/lib/i386/libnpjp2.so

Re: Howto install Oracle's Java on LMDE/Debian

Posted: Mon Oct 15, 2012 3:45 am
by jasmineaura
Very nice. Thank you for this Craig. :D

If I could add, though, the `update-alternatives --config javac` probably isn't really needed. As javac is the java compiler -- part of the Sun/oracle or the Open -jdk -- isn't at all related to any of the security vulnerabilities, because these affect the JRE -- Java Runtime Environment.

Sticking with the tried JRE6, at least till next year :D

Code: Select all

$ java -version
java version "1.6.0_35"
Java(TM) SE Runtime Environment (build 1.6.0_35-b10)
Java HotSpot(TM) 64-Bit Server VM (build 20.10-b01, mixed mode)

Re: Howto install Oracle's Java on LMDE/Debian

Posted: Sun Jan 06, 2013 5:24 pm
by mockturtl
UPDATE: 2013-01-14: Do not install 7u10. See the following post.

Code: Select all

$ fakeroot make-jpkg jre-7u10-linux-x64.tar.gz
...
No matching plugin was found.
With 7u10 [or higher], you need to edit /usr/share/java-package/oracle-j2re.sh (and/or oracle-j2sdk.sh, if you have the jdk).

The scripts are hard-coded to deal with a single-digit update number. Following the other examples, we'll... hard-code them to two digits. :-/ Should be future-proof, anyway. (Edit: ah, this resurrects #597294 from 2010, and is fixed in experimental.)

Insert a second [0-9], for both 32-bit and 64-bit cases, and change the ${archive_name} slice to 6:2
(in the filename, startIndex:length, so jre-7u10).

Code: Select all

# in oracle-j2re.sh

15   "jre-7u"[0-9][0-9]"-linux-i586.tar.gz") # SUPPORTED
16       j2se_version=1.7.0+update${archive_name:6:2}${revision}
...
31   "jre-7u"[0-9][0-9]"-linux-x64.tar.gz") # SUPPORTED
32       j2se_version=1.7.0+update${archive_name:6:2}${revision}

# similarly "jdk-7u" in oracle-j2sdk.sh
Now it works:

Code: Select all

$ fakeroot make-jpkg jdk-7u10-linux-x64.tar.gz 
...
Detected product:
    Java(TM) Development Kit (JDK)
    Standard Edition, Version 1.7.0+update10
    Oracle(TM), Inc.
Is this correct [Y/n]: y
...
The Debian package has been created in the current directory. You can
install the package as root (e.g. dpkg -i oracle-j2sdk1.7_1.7.0+update10_amd64.deb). 
Install and update-alternatives as above.

Code: Select all

$ java -version
java version "1.7.0_10"
Java(TM) SE Runtime Environment (build 1.7.0_10-b18)
Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)

Re: Howto install Oracle's Java on LMDE/Debian

Posted: Mon Jan 14, 2013 12:26 pm
by mockturtl

Re: Howto install Oracle's Java on LMDE/Debian

Posted: Fri Feb 01, 2013 4:52 pm
by mockturtl
yet another CRITICAL SECURITY UPDATE: 7u13
"And why not?"

(thanks bigj231)