Comments (4)
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.
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
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.
@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.
@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)
- native-image fails to set up Windows build environment HOT 2
- native-image not honoring abstract="true" and constructor overloading in the spring context.xml HOT 4
- Images with JFR will not build due to out of date substitution
- [GR-54994] Avoid duplicate JFR ThreadSleep events
- Native image fails to build inside Docker container on Mac with Apple Silicon using GraalVM CE 22.3.0 HOT 3
- Executable for JavaFX Modular CLI sample application built on Windows 11 with GraalVM 22.0.1+8.1 failed to run HOT 1
- Windows ARM64 Support HOT 1
- In my JNI library call a function in another share libray built by native-image, message : Segmentation fault HOT 4
- There is no way to know how to obtain the native-image binary tool. HOT 1
- MacOS only: Preferences.exportSubtree()/childrenNames() always kills process with "Fatal error reported via JNI: JVM_ArrayCopy called: Unimplemented" HOT 7
- [GR-55241] Performance regression of Scala compiler on GraalVM 17 -> 21 HOT 11
- GraalError: failed guarantee: value too large to fit into space HOT 1
- native-image-agent ceased to work as expected with AWT/JNI HOT 4
- [GR-55550] WASI signature conflict for fd_advise HOT 2
- native image fails to generate binary for a simple array manipulation HOT 1
- Cannot invoke "clojure.lang.Var.isBound()" because "clojure.lang.Compiler.LOADER" is null HOT 2
- docker pull container-registry.oracle.com/graalvm/native-image -> UNAUTHORIZED HOT 2
- Fatal error: com.oracle.svm.core.util.VMError$HostedError: guarantee failed HOT 2
- [GR-55718] MacOS only: System.getProperty("os.arch") is "x86_64" from JVM and then "amd64" from native image. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from graal.