Giter Club home page Giter Club logo

Comments (4)

selhagani avatar selhagani commented on August 15, 2024

Hi flben233, thanks for reaching out to us.

Could you please specify the exact versions of GraalVM that you are using? You can check by running the java --version command.
Also could you please provide a reproducer to your issue alongside the steps needed to reproduce it?

Thank you.

from graal.

flben233 avatar flben233 commented on August 15, 2024

Java Version
GraalVM 21:

java 21.0.1 2023-10-17
Java(TM) SE Runtime Environment Oracle GraalVM 21.0.1+12.1 (build 21.0.1+12-jvmci-23.1-b19)
Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 21.0.1+12.1 (build 21.0.1+12-jvmci-23.1-b19, mixed mode, sharing)

GraalVM 24:

openjdk 24 2025-03-18
OpenJDK Runtime Environment GraalVM CE 24-dev+4.1 (build 24+4-jvmci-b01)
OpenJDK 64-Bit Server VM GraalVM CE 24-dev+4.1 (build 24+4-jvmci-b01, mixed mode, sharing)

Steps to reproduce

Code here

Commands (I ran them in x64 Native Tools Command Prompt for VS 2022 in the project root):

.\gradlew -Pagent run
.\gradlew metadataCopy --task run --dir src\main\resources\META-INF\native-image
.\gradlew nativeBuild
.\build\native\TyuShare.exe    # run output exe

from graal.

oubidar-Abderrahim avatar oubidar-Abderrahim commented on August 15, 2024

@flben233 Thank you for sharing the reproducer, I'm afraid I cannot reproduce the issue with the provided steps.

Please create a native image bundle of your application and share it with us, you can find details on how to generate bundles in here: https://www.graalvm.org/latest/reference-manual/native-image/overview/Bundles/

from graal.

flben233 avatar flben233 commented on August 15, 2024

@oubidar-Abderrahim When I tried to create bundle, it told me:

Error: Failed to read bundle launcher resources '\com\oracle\svm\driver\launcher'
Caused by: java.lang.NullPointerException"

I also tried graalvm-community-openjdk-22.0.2+9.1 and I got the same output.

My graal configuration in build.gradle.kts is:

java {
    toolchain {
        languageVersion.set(JavaLanguageVersion.of(21))
    }
}

graalvmNative {
    toolchainDetection.set(false)
    binaries{
        named("main"){
            mainClass.set("MainKt")
            imageName.set("TyuShare")
            buildArgs("-O4", "--bundle-create")
        }
    }

    agent{
        metadataCopy {
            mergeWithExisting.set(true)
        }
    }
}

Full output:

D:\IdeaProjects\TyuShare>.\gradlew nativeCompile

> Task :nativeCompile FAILED
[native-image-plugin] GraalVM Toolchain detection is disabled
[native-image-plugin] GraalVM location read from environment variable: JAVA_HOME
[native-image-plugin] Native Image executable path: D:\Env\graalvm-jdk-21.0.1+12.1\bin\native-image.cmd

Error: Failed to read bundle launcher resources '\com\oracle\svm\driver\launcher'

Caused by: java.lang.NullPointerException

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':nativeCompile'.
> Process 'command 'D:\Env\graalvm-jdk-21.0.1+12.1\bin\native-image.cmd'' finished with non-zero exit value 20

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 4s
9 actionable tasks: 1 executed, 8 up-to-date

from graal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.