Java's Custom Runtime Builder - jlink

Поделиться
HTML-код
  • Опубликовано: 15 ноя 2024
  • НаукаНаука

Комментарии • 26

  • @viren012345
    @viren012345 8 месяцев назад +7

    Java moving ahead with changing times

  • @abduvohid8311
    @abduvohid8311 5 месяцев назад +1

    Cool. We are looking forward to new updates

  • @SourabhBhat
    @SourabhBhat 8 месяцев назад +10

    For me, jlink (and jpackage) has been useful when sharing an application with someone who may not have proper JDK installed. Otherwise, if I am setting up the environment, it is more efficient to just use the jar/class-files using the already installed JDK.

    • @kevinnguyen163
      @kevinnguyen163 8 месяцев назад +1

      I think it makes more sense for production deployment where you might need to spin up hundred of microservices and those MB and startup time saved are important.

    • @kevinnguyen163
      @kevinnguyen163 8 месяцев назад +1

      Also, as you might've noticed, most JDK vendors stopped releasing JRE, only JDK is availalbe (except for Eclipse Temurin). For those with more concern on having JDK stuff in the system is more risky, it makes sense to build custom runtime image.

    • @sen7826
      @sen7826 8 месяцев назад

      I have a problem with jpackage because it does not really wrap the jar into an exe but rather the exe file actually just runs the jar file which you can actually manually find inside the installation folder.

    • @SourabhBhat
      @SourabhBhat 8 месяцев назад

      @@sen7826To create a native executable you can use "native-image" from graalvm JDK. It works well for headless applications.

    • @ByronGoodman
      @ByronGoodman 8 месяцев назад

      Once native-image becomes more mature, jlink will be pointless.

  • @DonaldOldingHebb658
    @DonaldOldingHebb658 8 месяцев назад +2

    Очень информативно, спасибо!

  • @jcbrites
    @jcbrites 8 месяцев назад +1

    very informative. Thanks!

  • @pmorah
    @pmorah 8 месяцев назад

    Great presentation. Thanks

  • @learnnewskill1857
    @learnnewskill1857 2 месяца назад

    Hii,
    Thank you for creating a more informative video.
    I have one question regarding Custom JRE.
    Que: If we create a custom JRE with the help Jdeps and JLink.
    Can we create that custom JRE folder into docker image and when we create any spring boot project with Docker file, we directly pull that custom JRE from docker, Not pull any openJDK:21 and Not any other image only pull over custom JRE and start our spring boot application, it's possible or not?.
    Can you please create a video on that. Please 🙏

  • @GaffaStudios
    @GaffaStudios 8 месяцев назад

    It would be interesting to see how to handle applications with non-modular third party libraries.

  • @pluschlorinds446
    @pluschlorinds446 6 месяцев назад

    8:14
    I created a custom runtime with the command beblow, but it was 111MB (110MB lib directory only). did I do something wrong?
    jlink --output custom-java --add-modules java.base
    OS: Ubuntu 23.10 (x64)
    java 22 2024-03-19
    Java(TM) SE Runtime Environment Oracle GraalVM 22+36.1 (build 22+36-jvmci-b02)
    Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 22+36.1 (build 22+36-jvmci-b02, mixed mode, sharing)

  • @zombi1034
    @zombi1034 8 месяцев назад +3

    I like jpackage but I think for the time being I will live with a little bigger disk and memory footprint and not bother spending the time working with jlink😂

  • @dmitrikonnov922
    @dmitrikonnov922 6 месяцев назад

    As for me, building custom runtimes or native images entails so much overhead which moreover infilters the operation procedures, that it makes using java in greenfield cloud-native environment look more and more unattractive compared to other languages like Golang etc. Yes, the latter one and its libraries have not been as mature nor versatile as those for Java, but easy to write, build, deploy & operate, has a small memory footprint and starts fast.

  • @bartek38912051
    @bartek38912051 8 месяцев назад

    Maybe stupid question not related to this topic, but is memory leak issue possible in java?

    • @charonstyxferryman
      @charonstyxferryman 8 месяцев назад +1

      In the JVM, memory management is not manual (like e.g. C++), but done automatically by the JVM's GC (Garbage Collector), so no.

    • @cmyanmar13
      @cmyanmar13 6 месяцев назад

      Yes: Running threads are not GC'd, so you must manage them manually.

  • @TobeOnwura
    @TobeOnwura 8 месяцев назад +1

    Nice

  • @oneextrabit
    @oneextrabit 8 месяцев назад +1

    This will be huge for lambdas

  • @quelvix
    @quelvix 6 месяцев назад

    I only tried it in 1 personal project and it was an absolute pain. If any of your dependencies doesn't support modules, you're doomed. And widely used dependencies like Apache Commons Codec are among these libraries. Never again.

  • @Agagh
    @Agagh 7 месяцев назад

    Native images are slowly killing jlink

  • @Sir_Ray_LegStrong_Bongabong
    @Sir_Ray_LegStrong_Bongabong 8 месяцев назад

    hello hi