Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: How to install java 8 JRE & JDK?

  1. #1

    Question How to install java 8 JRE & JDK?

    Hi guys. I cant seem to find a guide to install both Java 8 JRE & JDK in OpenSuse 42.1.

    Please advise me and point me to one.

    Thanks,

  2. #2
    Join Date
    Sep 2008
    Posts
    2,997

    Default Re: How to install java 8 JRE & JDK?

    Quote Originally Posted by katana85 View Post
    Hi guys. I cant seem to find a guide to install both Java 8 JRE & JDK in OpenSuse 42.1.

    Please advise me and point me to one.

    Thanks,
    you cn install openjdk 1.8 (or 8.0) from the standard oss repo's (it should already be installed) by executing
    Code:
    zypper in java-1_8_0-openjdk
    to get oracle's jave go to
    https://www.java.com/en/download/linux_manual.jsp
    and select the 64bit rpm or click this
    http://javadl.sun.com/webapps/downlo...undleId=111740
    then open a terminal in the download folder install that rpm with zypper
    Code:
    zypper in jre-8u66-linux-x64.rpm

  3. #3

    Default Re: How to install java 8 JRE & JDK?

    Is installing enough? I used to be configure it after install when I was in Fedora 23. And what about JDK?

  4. #4
    Join Date
    Sep 2008
    Posts
    2,997

    Default Re: How to install java 8 JRE & JDK?

    Quote Originally Posted by katana85 View Post
    Is installing enough? I used to be configure it after install when I was in Fedora 23. And what about JDK?
    you need to use update-alternatives in order to select/set the default java run-time, even tho it's called openjdk it's not a development toolkit it's a run-time, I do believe there is gui in kde's config center just not sure if it was kde4's or plasma 5's as I don't really use java I only keep the one that came with the OS.

    edit
    just remembered the KDE GUI was an extra package I played around with a few months ago it's for KDE4
    https://software.opensuse.org/package/kalternatives
    http://kde-apps.org/content/show.php...?content=16016

  5. #5
    Join Date
    Sep 2008
    Posts
    2,997

    Default Re: How to install java 8 JRE & JDK?

    sorry didn't see your jdk question
    well for installing the jdk is more or less the same
    install the java-1_8_0-openjdk-devel packages which carry the compiler and libraries
    Code:
    zypper in java-1_8_0-openjdk-devel
    for Oracle's version go here and download the 64bit rpm
    http://www.oracle.com/technetwork/ja...s-2133151.html
    or click this
    http://download.oracle.com/otn-pub/j...-linux-x64.rpm
    then install it with zypper
    Code:
    zypper in jdk-8u66-linux-x64.rpm
    again use update-alternatives to set the preferred java compiler

  6. #6

    Default Re: How to install java 8 JRE & JDK?

    I installed JRE and JDK. I also installed kalternative but I dont know how to run it?

    I tried update-alternatives but it seems that it cant see the Java 8 new install.


    arkan:/home/ahmed # update-alternatives --all
    There is only one alternative in link group alternate-install-present (providing /usr/lib/nvidia/alternate-install-present): /usr/lib/nvidia/alternate-install-present-default
    Nothing to configure.

    There is only one alternative in link group awk (providing /bin/awk): /usr/bin/gawk
    Nothing to configure.

    There is only one alternative in link group coverage (providing /usr/bin/coverage): /usr/bin/coverage-3.4
    Nothing to configure.

    There is only one alternative in link group db_archive (providing /usr/bin/db_archive): /usr/bin/db48_archive
    Nothing to configure.

    There is only one alternative in link group db_checkpoint (providing /usr/bin/db_checkpoint): /usr/bin/db48_checkpoint
    Nothing to configure.

    There is only one alternative in link group db_deadlock (providing /usr/bin/db_deadlock): /usr/bin/db48_deadlock
    Nothing to configure.

    There is only one alternative in link group db_dump (providing /usr/bin/db_dump): /usr/bin/db48_dump
    Nothing to configure.

    There is only one alternative in link group db_hotbackup (providing /usr/bin/db_hotbackup): /usr/bin/db48_hotbackup
    Nothing to configure.

    There is only one alternative in link group db_load (providing /usr/bin/db_load): /usr/bin/db48_load
    Nothing to configure.

    There is only one alternative in link group db_printlog (providing /usr/bin/db_printlog): /usr/bin/db48_printlog
    Nothing to configure.

    There is only one alternative in link group db_recover (providing /usr/bin/db_recover): /usr/bin/db48_recover
    Nothing to configure.

    There is only one alternative in link group db_sql (providing /usr/bin/db_sql): /usr/bin/db48_sql
    Nothing to configure.

    There is only one alternative in link group db_stat (providing /usr/bin/db_stat): /usr/bin/db48_stat
    Nothing to configure.

    There is only one alternative in link group db_upgrade (providing /usr/bin/db_upgrade): /usr/bin/db48_upgrade
    Nothing to configure.

    There is only one alternative in link group db_verify (providing /usr/bin/db_verify): /usr/bin/db48_verify
    Nothing to configure.

    There is only one alternative in link group easy_install (providing /usr/bin/easy_install): /usr/bin/easy_install-3.4
    Nothing to configure.

    There is only one alternative in link group ftp (providing /usr/bin/ftp): /usr/bin/tnftp
    Nothing to configure.

    There is only one alternative in link group funzip (providing /usr/bin/funzip): /usr/bin/funzip-plain
    Nothing to configure.

    There is only one alternative in link group gem2rpm (providing /usr/bin/gem2rpm): /usr/bin/gem2rpm.ruby2.1-0.10.1
    Nothing to configure.

    There is only one alternative in link group gem2rpm-0.10.1 (providing /usr/bin/gem2rpm-0.10.1): /usr/bin/gem2rpm.ruby2.1-0.10.1
    Nothing to configure.

    There is only one alternative in link group gem2rpm.ruby2.1 (providing /usr/bin/gem2rpm.ruby2.1): /usr/bin/gem2rpm.ruby2.1-0.10.1
    Nothing to configure.

    There is only one alternative in link group gst-install-plugins-helper (providing /usr/lib/gst-install-plugins-helper): /usr/lib/pk-gstreamer-install
    Nothing to configure.

    There are 2 choices for the alternative gtk-update-icon-cache (providing /usr/bin/gtk-update-icon-cache).

    Selection Path Priority Status
    ------------------------------------------------------------
    * 0 /usr/bin/gtk-update-icon-cache-3.0 3 auto mode
    1 /usr/bin/gtk-update-icon-cache-2.0 2 manual mode
    2 /usr/bin/gtk-update-icon-cache-3.0 3 manual mode

    Press enter to keep the current choice[*], or type selection number: 3
    There are 2 choices for the alternative gtk-update-icon-cache (providing /usr/bin/gtk-update-icon-cache).

    Selection Path Priority Status
    ------------------------------------------------------------
    * 0 /usr/bin/gtk-update-icon-cache-3.0 3 auto mode
    1 /usr/bin/gtk-update-icon-cache-2.0 2 manual mode
    2 /usr/bin/gtk-update-icon-cache-3.0 3 manual mode

    Press enter to keep the current choice[*], or type selection number: 0

    There are 2 choices for the alternative icewm (providing /usr/bin/icewm).

    Selection Path Priority Status
    ------------------------------------------------------------
    * 0 /usr/bin/icewm-default 100 auto mode
    1 /usr/bin/icewm-default 100 manual mode
    2 /usr/bin/icewm-lite 0 manual mode

    Press enter to keep the current choice[*], or type selection number: 0

    There is only one alternative in link group input.svgz (providing /usr/share/plasma/desktoptheme/default/icons/input.svgz): /usr/share/plasma/desktoptheme/default/icons/input.svgz-kdeorg
    Nothing to configure.

    There are 2 choices for the alternative java (providing /usr/bin/java).

    Selection Path Priority Status
    ------------------------------------------------------------
    * 0 /usr/lib64/jvm/jre-1.8.0-openjdk/bin/java 1805 auto mode
    1 /usr/lib64/jvm/jre-1.7.0-openjdk/bin/java 1705 manual mode
    2 /usr/lib64/jvm/jre-1.8.0-openjdk/bin/java 1805 manual mode

    Press enter to keep the current choice[*], or type selection number: 0

    There are 2 choices for the alternative javaplugin (providing /usr/lib64/browser-plugins/javaplugin.so).

    Selection Path Priority Status
    ------------------------------------------------------------
    * 0 /usr/lib64/java-1_8_0-openjdk-plugin/lib/IcedTeaPlugin.so 18020 auto mode
    1 /usr/lib64/java-1_7_0-openjdk-plugin/lib/IcedTeaPlugin.so 17147 manual mode
    2 /usr/lib64/java-1_8_0-openjdk-plugin/lib/IcedTeaPlugin.so 18020 manual mode

    Press enter to keep the current choice[*], or type selection number: 0

    There is only one alternative in link group jre_1.7.0 (providing /usr/lib64/jvm/jre-1.7.0): /usr/lib64/jvm/jre-1.7.0-openjdk
    Nothing to configure.

    There is only one alternative in link group jre_1.8.0 (providing /usr/lib64/jvm/jre-1.8.0): /usr/lib64/jvm/jre-1.8.0-openjdk
    Nothing to configure.

    There are 2 choices for the alternative jre_openjdk (providing /usr/lib64/jvm/jre-openjdk).

    Selection Path Priority Status
    ------------------------------------------------------------
    * 0 /usr/lib64/jvm/jre-1.8.0-openjdk 1805 auto mode
    1 /usr/lib64/jvm/jre-1.7.0-openjdk 1705 manual mode
    2 /usr/lib64/jvm/jre-1.8.0-openjdk 1805 manual mode

    Press enter to keep the current choice[*], or type selection number: 0

    There are 2 choices for the alternative kdesu (providing /usr/bin/kdesu).

    Selection Path Priority Status
    ------------------------------------------------------------
    * 0 /usr/lib64/libexec/kf5/kdesu 25 auto mode
    1 /usr/lib64/kde4/libexec/kdesu 20 manual mode
    2 /usr/lib64/libexec/kf5/kdesu 25 manual mode

    Press enter to keep the current choice[*], or type selection number: 0

    There is only one alternative in link group keyring (providing /usr/bin/keyring): /usr/bin/keyring-2.7
    Nothing to configure.

    There is only one alternative in link group ksh (providing /bin/ksh): /bin/ksh93
    Nothing to configure.

    There is only one alternative in link group ld (providing /usr/bin/ld): /usr/bin/ld.bfd
    Nothing to configure.

    There is only one alternative in link group libblas.so.3 (providing /usr/lib64/libblas.so.3): /usr/lib64/blas/libblas.so.3
    Nothing to configure.

    There are 2 choices for the alternative libglx.so (providing /usr/lib64/xorg/modules/extensions/libglx.so).

    Selection Path Priority Status
    ------------------------------------------------------------
    * 0 /usr/lib64/xorg/modules/extensions/nvidia/nvidia-libglx.so 100 auto mode
    1 /usr/lib64/xorg/modules/extensions/nvidia/nvidia-libglx.so 100 manual mode
    2 /usr/lib64/xorg/modules/extensions/xorg/xorg-libglx.so 50 manual mode

    Press enter to keep the current choice[*], or type selection number: 0

    There is only one alternative in link group liblapack.so.3 (providing /usr/lib64/liblapack.so.3): /usr/lib64/lapack/liblapack.so.3
    Nothing to configure.

    There is only one alternative in link group lua (providing /usr/bin/lua): /usr/bin/lua5.2
    Nothing to configure.

    There is only one alternative in link group mount.ntfs (providing /sbin/mount.ntfs): /sbin/mount.ntfs-3g
    Nothing to configure.

    There is only one alternative in link group netcat (providing /usr/bin/netcat): /usr/bin/nc
    Nothing to configure.

    There is only one alternative in link group nosetests (providing /usr/bin/nosetests): /usr/bin/nosetests-3.4
    Nothing to configure.

    There is only one alternative in link group openSUSE-default.xml (providing /usr/share/wallpapers/openSUSE-default.xml): /usr/share/wallpapers/openSUSE-default-static.xml
    Nothing to configure.

    There is only one alternative in link group pip (providing /usr/bin/pip): /usr/bin/pip3.4
    Nothing to configure.

    There is only one alternative in link group rake (providing /usr/bin/rake): /usr/bin/rake.ruby.ruby2.1
    Nothing to configure.

    There is only one alternative in link group rake.ruby2.1 (providing /usr/bin/rake.ruby2.1): /usr/bin/rake.ruby.ruby2.1
    Nothing to configure.

    There is only one alternative in link group rdoc (providing /usr/bin/rdoc): /usr/bin/rdoc.ruby.ruby2.1
    Nothing to configure.

    There is only one alternative in link group rdoc.ruby2.1 (providing /usr/bin/rdoc.ruby2.1): /usr/bin/rdoc.ruby.ruby2.1
    Nothing to configure.

    There is only one alternative in link group ri (providing /usr/bin/ri): /usr/bin/ri.ruby.ruby2.1
    Nothing to configure.

    There is only one alternative in link group ri.ruby2.1 (providing /usr/bin/ri.ruby2.1): /usr/bin/ri.ruby.ruby2.1
    Nothing to configure.

    There is only one alternative in link group unzip (providing /usr/bin/unzip): /usr/bin/unzip-plain
    Nothing to configure.

    There is only one alternative in link group unzipsfx (providing /usr/bin/unzipsfx): /usr/bin/unzipsfx-plain
    Nothing to configure.

    There is only one alternative in link group vncviewer (providing /usr/bin/vncviewer): /usr/bin/vncviewer-tigervnc
    Nothing to configure.

    There is only one alternative in link group xml-commons-apis (providing /usr/share/java/xml-commons-apis.jar): /usr/share/java/xerces-j2-xml-apis.jar
    Nothing to configure.

    There is only one alternative in link group zipgrep (providing /usr/bin/zipgrep): /usr/bin/zipgrep-plain
    Nothing to configure.


    Please advise me. Thanks,

  7. #7
    Join Date
    Sep 2008
    Posts
    2,997

    Default Re: How to install java 8 JRE & JDK?

    to use kalternatives you need to use kde4's settings center for that you need to install kdebase4-workspace-addons
    Code:
    zypper in kdebase4-workspace-addons
    then you need to run systemsettings
    Code:
    systemsettings
    there should be a menu item called KDE System Settings but plasma5 also has that menu item for running plasma 5 system settings.

    the rest of your post is informative, update-alternatives is not used for java only it's used for a lot of other applications and for most you don't have an alternative.
    I'd say you need to run
    for jre
    Code:
    update-alternatives --config java
    for jdk
    Code:
    update-alternatives --config javac

  8. #8

    Default Re: How to install java 8 JRE & JDK?

    The java 8 is not showing in the alternatives list. I need it to be added to show.

    Code:
    arkan:/home/ahmed # update-alternatives --config java
    There are 2 choices for the alternative java (providing /usr/bin/java).      
                                                                                 
      Selection    Path                                       Priority   Status  
    ------------------------------------------------------------                 
    * 0            /usr/lib64/jvm/jre-1.8.0-openjdk/bin/java   1805      auto mode
      1            /usr/lib64/jvm/jre-1.7.0-openjdk/bin/java   1705      manual mode
      2            /usr/lib64/jvm/jre-1.8.0-openjdk/bin/java   1805      manual mode                       
    
    Press enter to keep the current choice[*], or type selection number: 0
    arkan:/home/ahmed # update-alternatives --config javac
    update-alternatives: error: no alternatives for javac
    arkan:/home/ahmed #

  9. #9
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,251
    Blog Entries
    2

    Default Re: How to install java 8 JRE & JDK?

    Quote Originally Posted by katana85 View Post
    The java 8 is not showing in the alternatives list. I need it to be added to show.

    Code:
    arkan:/home/ahmed # update-alternatives --config java
    There are 2 choices for the alternative java (providing /usr/bin/java).      
                                                                                 
      Selection    Path                                       Priority   Status  
    ------------------------------------------------------------                 
    * 0            /usr/lib64/jvm/jre-1.8.0-openjdk/bin/java   1805      auto mode
      1            /usr/lib64/jvm/jre-1.7.0-openjdk/bin/java   1705      manual mode
      2            /usr/lib64/jvm/jre-1.8.0-openjdk/bin/java   1805      manual mode                       
    
    Press enter to keep the current choice[*], or type selection number: 0
    arkan:/home/ahmed # update-alternatives --config javac
    update-alternatives: error: no alternatives for javac
    arkan:/home/ahmed #
    It looks like your update-alternatives is currently set to Java 8 JRE using openjdk ( 1.8.x is Java 8).
    javac is a package and binary, so there wouldn't be an update-alternatives setting it (at most there might have been an update-alternatives setting for the jdk, but that doesn't seem to be the case for openjdk's jdk).

    So,
    Some things to know about the jre and jdk using openjdk...
    - By default when you install the openjdk package, it only installs the jre, you don't install the jdk.
    - To install the openjdk jdk, you have to install the package openjdk-devel(select specific version for 7 or 8).
    - Once openjdk-devel is installed, although it's automatically linked to the existing update-alternative options(You won't see a new separate option), it looks like it's set regardless of update-alternatives setting (eg if you set to Java 7 jre, you're still using the Java 8 jdk). I don't know if that's an error or not.

    Bottom line for your example invoking javac is that it wouldn't be even expected to be seen in update-alternatives. If it's installed, it's accessible without needing any switching.
    You should just be able to invoke in a console, eg
    Code:
    javac -help
    TSU

  10. #10

    Default Re: How to install java 8 JRE & JDK?

    Quote Originally Posted by katana85 View Post
    The java 8 is not showing in the alternatives list. I need it to be added to show.
    The Oracle package doesn't facilitate ease of use with update-alternatives (you have to manually intervine). You need to use (as root) update-alternatives --install blah blah blah

    See man update-alternatives for details about the blah blah blah switches

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •