Results 1 to 4 of 4

Thread: how to setup java-1_8_0-openjdk-devel after installation ?

  1. #1

    Default how to setup java-1_8_0-openjdk-devel after installation ?

    Hello i have installed java-1_8_0-openjdk-devel via yast in openSUSE Leap 42.1 , now how do i install and set it up as the system default(like for java,javac,jar,javaws etc.) and also use java-1_8_0-openjdk-plugin for the browser plugin by using update-alternatives ?( how to install the respective firefox plugin ?)
    This is the current addon i can see in firefox- IcedTea-Web Plugin (using IcedTea-Web 1.6.1 (suse-1.2-x86_64))

    These are my current configs - As you can see there are only jre* options in --config java and there are lot of java-1_8_0-openjdk* folders in /usr/lib64/jvm/) . Please help on how to proceed from here, planning to use tools like android studio, Intellij IDEA etc..

    Code:
    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
    
    update-alternatives --config javac
    There is only one alternative in link group javac (providing /usr/bin/javac): /usr/lib64/jvm/java-1.8.0-openjdk/bin/javac
    Nothing to configure.
    
    update-alternatives --config jar
    update-alternatives: error: no alternatives for jar
    
    
    update-alternatives --config javaws
    update-alternatives: error: no alternatives for javaws
    
    update-alternatives --config javaplugin
    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
    Should the update-alternatives be install and set for the following things too ?
    Code:
    jexec,appletviewer,apt,extcheck ,idlj,jarsigner ,javadoc, javafxpackager, javah, javap,java-rmi.cgi,jcmd ,jconsole,jcontrol,jdb,jhat,jinfo,jmap,jmc,jps,jrunscript,jsadebugd,jstack,jstat,jstatd,jvisualvm,keytool,native2ascii,orbd,pack200,policytool,rmic,rmid ,rmiregistry,schemagen,serialver,servertool,tnameserv,unpack200,wsgen,wsimport,xjc, java_vm
    Will the man pages be available for everything ? or should it be installed ? Should JAVA_HOME User Environment Variable be specified in .bashrc ?

  2. #2
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    10,806
    Blog Entries
    1

    Default Re: how to setup java-1_8_0-openjdk-devel after installation ?

    Quote Originally Posted by knightsu View Post
    Hello i have installed java-1_8_0-openjdk-devel via yast in openSUSE Leap 42.1 , now how do i install and set it up as the system default(like for java,javac,jar,javaws etc.) and also use java-1_8_0-openjdk-plugin for the browser plugin by using update-alternatives ?( how to install the respective firefox plugin ?)
    This is the current addon i can see in firefox- IcedTea-Web Plugin (using IcedTea-Web 1.6.1 (suse-1.2-x86_64))

    These are my current configs - As you can see there are only jre* options in --config java and there are lot of java-1_8_0-openjdk* folders in /usr/lib64/jvm/) . Please help on how to proceed from here, planning to use tools like android studio, Intellij IDEA etc..

    Code:
    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
    
    update-alternatives --config javac
    There is only one alternative in link group javac (providing /usr/bin/javac): /usr/lib64/jvm/java-1.8.0-openjdk/bin/javac
    Nothing to configure.
    
    update-alternatives --config jar
    update-alternatives: error: no alternatives for jar
    
    
    update-alternatives --config javaws
    update-alternatives: error: no alternatives for javaws
    
    update-alternatives --config javaplugin
    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
    Should the update-alternatives be install and set for the following things too ?
    Code:
    jexec,appletviewer,apt,extcheck ,idlj,jarsigner ,javadoc, javafxpackager, javah, javap,java-rmi.cgi,jcmd ,jconsole,jcontrol,jdb,jhat,jinfo,jmap,jmc,jps,jrunscript,jsadebugd,jstack,jstat,jstatd,jvisualvm,keytool,native2ascii,orbd,pack200,policytool,rmic,rmid ,rmiregistry,schemagen,serialver,servertool,tnameserv,unpack200,wsgen,wsimport,xjc, java_vm
    Will the man pages be available for everything ? or should it be installed ? Should JAVA_HOME User Environment Variable be specified in .bashrc ?
    Although I haven't looked at java-1_8_0-openjdk-devel, if it is similar in some ways to previous version implementations...

    When you install, the individual JDK-devel binaries should be immediately available. Test by running something like
    Code:
    javac --help
    Several others you mention should already work because they are part of the JDK (base openjdk, not the devel package), like java and jar.

    I don't know about any options or implementation for web browser plugin, and I know there are significant architectural differences compared to previous versions of java.

    I've never thought about using update-alternatives to invoke the "devel" binaries like javac. I don't know if it makes too much sense unless you have multiple javac (as an example) installed on your system. It makes sense to switch between jre using update-alternatives, though. In its strictest sense, yes the jre is installed as part of the devel package but it's identical to the standalone jre.

    Unless you have both Oracle SE JDK and openjdk-devel installed on the same machine... or multiple versions of openjdk-devel installed (I don't know if that'd be recommended) I don't see a use for update-alternatives.

    If an update-alternatives solution doesn't exist for a scenario you need, I'd recommend as alternative solutions running either a Linux container (prob LXC or docker) if you absolutely need performance or virtualization if hardware access isn't necessary.

    TSU

  3. #3

    Default Re: how to setup java-1_8_0-openjdk-devel after installation ?

    Quote Originally Posted by tsu2 View Post
    Although I haven't looked at java-1_8_0-openjdk-devel, if it is similar in some ways to previous version implementations...

    When you install, the individual JDK-devel binaries should be immediately available. Test by running something like
    Code:
    javac --help
    Several others you mention should already work because they are part of the JDK (base openjdk, not the devel package), like java and jar.

    I don't know about any options or implementation for web browser plugin, and I know there are significant architectural differences compared to previous versions of java.

    I've never thought about using update-alternatives to invoke the "devel" binaries like javac. I don't know if it makes too much sense unless you have multiple javac (as an example) installed on your system. It makes sense to switch between jre using update-alternatives, though. In its strictest sense, yes the jre is installed as part of the devel package but it's identical to the standalone jre.

    Unless you have both Oracle SE JDK and openjdk-devel installed on the same machine... or multiple versions of openjdk-devel installed (I don't know if that'd be recommended) I don't see a use for update-alternatives.

    If an update-alternatives solution doesn't exist for a scenario you need, I'd recommend as alternative solutions running either a Linux container (prob LXC or docker) if you absolutely need performance or virtualization if hardware access isn't necessary.

    TSU
    well from the config it looks like its been set to the java inside jre. So how do i change java config from jre to the jdk one (all three options are the same)? why do i get error for --config javaws ? update-alternatives: error: no alternatives for javaws .
    I am just starting out(newbie) and suggesting Linux container(LXC or docker) might complicate things for me. i havent used them before.

  4. #4
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    10,806
    Blog Entries
    1

    Default Re: how to setup java-1_8_0-openjdk-devel after installation ?

    Quote Originally Posted by knightsu View Post
    well from the config it looks like its been set to the java inside jre. So how do i change java config from jre to the jdk one (all three options are the same)? why do i get error for --config javaws ? update-alternatives: error: no alternatives for javaws .
    I am just starting out(newbie) and suggesting Linux container(LXC or docker) might complicate things for me. i havent used them before.
    I must have explained this incorrectly... Try this...
    Think of openjdk-devel(the extras) more like an extension to openjdk(the jre)

    Therefor, there should not be any need to switch to openjdk-devel, once installed the "extras" binaries should be immediately available, if not already in a system PATH, then you can create that or use an explicit path in your command.

    TSU

Posting Permissions

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