clearlinux / distribution

Placeholder repository to allow filing of general bugs/issues/etc against the Clear Linux OS for Intel Architecture linux distribution
521 stars 29 forks source link

Installing java11-basic also adds 19MB of java-1.8.0-openjdk for no apparent reason #940

Open kebeda opened 5 years ago

kebeda commented 5 years ago

Steps to reproduce.

  1. Clean install
  2. swupd bundle-add java11-basic
  3. cd /usr/lib/jvm/java-1.8.0-openjdk
  4. du -hc
    64K ./jre/lib/amd64/jli
    13M ./jre/lib/amd64/server
    18M ./jre/lib/amd64
    18M ./jre/lib
    18M ./jre
    60K ./demo/jvmti/heapTracker/lib
    64K ./demo/jvmti/heapTracker
    20K ./demo/jvmti/gctest/lib
    24K ./demo/jvmti/gctest
    20K ./demo/jvmti/heapViewer/lib
    24K ./demo/jvmti/heapViewer
    20K ./demo/jvmti/versionCheck/lib
    24K ./demo/jvmti/versionCheck
    52K ./demo/jvmti/minst/lib
    56K ./demo/jvmti/minst
    56K ./demo/jvmti/mtrace/lib
    60K ./demo/jvmti/mtrace
    148K    ./demo/jvmti/waiters/lib
    152K    ./demo/jvmti/waiters
    24K ./demo/jvmti/compiledMethodLoad/lib
    28K ./demo/jvmti/compiledMethodLoad
    244K    ./demo/jvmti/hprof/lib
    248K    ./demo/jvmti/hprof
    684K    ./demo/jvmti
    688K    ./demo
    64K ./lib/amd64/jli
    84K ./lib/amd64
    88K ./lib
    19M .
    19M total

    None of these files are needed with Java 11. Also, JAVA_HOME and PATH environment variables are not set.

AthenasJimenez commented 4 years ago

Fixed, no extra files from java8 are installed with java11-basic.

Regarding to the PATH, that's also fixed. Notice that Java8 is the system default, so if it is installed directly with its own bundle (java8-basic) or indirectly as part of any other bundle, /usr/bin/java would call java8 binary. To change this behavior, just set the appropriate JAVA_HOME.

export JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk

On the other hand, if you only have installed java11-basic bundle, /usr/bin/java java11 binary would be called without extra steps.