Results 1 to 5 of 5

Thread: openJDK comes without javac

  1. #1
    Join Date
    Jun 2014
    Location
    Bonn, Germany
    Posts
    78

    Default openJDK comes without javac

    Hi all!

    I tried to compile a simple Java programme. I was surprised I ran into command-not-found error. Turns out
    Code:
    which javac 
    which: no javac in ...
    I have, however, an installed JDK on my machine:
    Code:
    sudo zypper se jdk 
    Loading repository data... 
    Reading installed packages... 
     
    S  | Name                             | Summary                            | Type 
    ---+----------------------------------+------------------------------------+----------- 
       | java-10-openjdk                  | OpenJDK 10 Runtime Environment     | package 
       | java-10-openjdk-accessibility    | OpenJDK 10 accessibility connector | package 
       | java-10-openjdk-demo             | OpenJDK 10 Demos                   | package 
       | java-10-openjdk-devel            | OpenJDK 10 Development Environment | package 
       | java-10-openjdk-headless         | OpenJDK 10 Runtime Environment     | package 
       | java-10-openjdk-javadoc          | OpenJDK 10 API Documentation       | package 
       | java-10-openjdk-jmods            | JMods for OpenJDK 10               | package 
       | java-10-openjdk-src              | OpenJDK 10 Source Bundle           | package 
    i+ | java-11-openjdk                  | OpenJDK 11 Runtime Environment     | package 
       | java-11-openjdk                  | OpenJDK 11 Runtime Environment     | srcpackage 
       | java-11-openjdk-accessibility    | OpenJDK 11 accessibility connector | package 
       | java-11-openjdk-demo             | OpenJDK 11 Demos                   | package 
       | java-11-openjdk-devel            | OpenJDK 11 Development Environment | package 
    i+ | java-11-openjdk-headless         | OpenJDK 11 Runtime Environment     | package 
       | java-11-openjdk-javadoc          | OpenJDK 11 API Documentation       | package 
       | java-11-openjdk-jmods            | JMods for OpenJDK 11               | package 
       | java-11-openjdk-src              | OpenJDK 11 Source Bundle           | package 
       | java-1_8_0-openjdk               | OpenJDK 8 Runtime Environment      | package 
       | java-1_8_0-openjdk               | OpenJDK 8 Runtime Environment      | srcpackage 
       | java-1_8_0-openjdk-accessibility | OpenJDK 8 accessibility connector  | package 
       | java-1_8_0-openjdk-demo          | OpenJDK 8 Demos                    | package 
       | java-1_8_0-openjdk-devel         | OpenJDK 8 Development Environment  | package 
       | java-1_8_0-openjdk-headless      | OpenJDK 8 Runtime Environment      | package 
       | java-1_8_0-openjdk-javadoc       | OpenJDK 8 API Documentation        | package 
       | java-1_8_0-openjdk-src           | OpenJDK 8 Source Bundle            | package 
       | java-9-openjdk                   | OpenJDK 9 Runtime Environment      | package 
       | java-9-openjdk-accessibility     | OpenJDK 9 accessibility connector  | package 
       | java-9-openjdk-demo              | OpenJDK 9 Demos                    | package 
       | java-9-openjdk-devel             | OpenJDK 9 Development Environment  | package 
       | java-9-openjdk-headless          | OpenJDK 9 Runtime Environment      | package 
       | java-9-openjdk-javadoc           | OpenJDK 9 API Documentation        | package 
       | java-9-openjdk-jmods             | JMods for OpenJDK 9                | package 
       | java-9-openjdk-src               | OpenJDK 9 Source Bundle            | package 
       | slf4j-jdk14                      | SLF4J JDK14 Binding                | package
    Searching for javac alone did not help
    Code:
    sudo zypper se javac 
    Loading repository data... 
    Reading installed packages... 
     
    S | Name                        | Summary                                          | Type 
    --+-----------------------------+--------------------------------------------------+-------- 
      | javacc                      | A Parser and Scanner Generator for Java          | package 
      | javacc-bootstrap            | A Parser and Scanner Generator for Java          | package 
      | javacc-demo                 | Examples for javacc                              | package 
      | javacc-javadoc              | Javadoc for javacc                               | package 
      | javacc-manual               | Manual for javacc                                | package 
      | javacc-maven-plugin         | Maven Plugin for processing JavaCC grammar files | package 
      | javacc-maven-plugin-javadoc | Javadoc for javacc-maven-plugin                  | package 
      | javacc3                     | A parser/scanner generator for java              | package 
      | javacc3-demo                | A parser/scanner generator for java              | package 
      | javacc3-manual              | A parser/scanner generator for java              | package 
      | javacc3-repolib             | A parser/scanner generator for java              | package
    (As far as my google skills reach, javacc is something unrelated.)

    This is pretty confusing. I expected the Java Development Kit to come with the Java Compiler. At least, I expected to be able to install javac easily. Note that note even software.opensuse.org is of great help here.

    What do I miss? How can I install a complete Jave toolchain on Leap?

  2. #2
    Join Date
    Jun 2008
    Location
    East of Podunk
    Posts
    33,406
    Blog Entries
    15

    Default Re: openJDK comes without javac

    Hi
    But not the development package.....
    Code:
    java-11-openjdk-devel            | OpenJDK 11 Development Environment | package
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  3. #3
    Join Date
    Jun 2014
    Location
    Bonn, Germany
    Posts
    78

    Angry Re: openJDK comes without javac

    Thanks, that fixed it.

    Then again, it leaves me a little puzzled: In my opinion, a -devel package should be for development of openJDK. It is against my interpretation that for using javac, I am forced to install the development package (I don't need python-devel to run a Python script etc). That's a weird decision imho.

  4. #4
    Join Date
    Jan 2014
    Location
    Erlangen
    Posts
    4,214
    Blog Entries
    5

    Default Re: openJDK comes without javac

    Quote Originally Posted by pbiel View Post
    Thanks, that fixed it.

    Then again, it leaves me a little puzzled: In my opinion, a -devel package should be for development of openJDK. It is against my interpretation that for using javac, I am forced to install the development package (I don't need python-devel to run a Python script etc). That's a weird decision imho.
    Try YaST/Zypper Repository (SUSE Linux): https://bell-sw.com/pages/repositories/#zypper
    Code:
    erlangen:~ # zypper lr BellSoft 
    Alias          : BellSoft 
    Name           : BellSoft Repository 
    URI            : http://yum.bell-sw.com/ 
    Enabled        : Yes 
    GPG Check      : (r ) Yes 
    Priority       : 100 (lowered priority)
    Autorefresh    : On 
    Keep Packages  : Off 
    Type           : rpm-md 
    GPG Key URI    : https://download.bell-sw.com/pki/GPG-KEY-bellsoft 
    Path Prefix    :  
    Parent Service :  
    Keywords       : --- 
    Repo Info Path : /etc/zypp/repos.d/repo-bellsoft.repo 
    MD Cache Path  : /var/cache/zypp/raw/BellSoft 
    erlangen:~ #
    
    openSUSE Tumbleweed, KDE Plasma, Blogs/KeepItSimple, i7-6700K (2016), i5-8250U (2018), AMD Ryzen 5 3400G (2020), 5600X, 5700U (2022)

  5. #5
    Join Date
    Sep 2012
    Posts
    8,067

    Default Re: openJDK comes without javac

    Quote Originally Posted by pbiel View Post
    -devel package should be for development of openJDK.
    No. foo-devel is for development software that is using or based on foo, i.e. developing against foo. openjdk-devel is for developing java programs, not openjdk itself.
    It is against my interpretation that for using javac, I am forced to install the development package
    You use javac to compile java program that you develop. You do not use javac to run compiled program.
    (I don't need python-devel to run a Python script etc).
    You do not need javac to run Java program.
    That's a weird decision imho.
    Or you simply do not understand it.

Tags for this Thread

Posting Permissions

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