-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[native-image] windows: ProcessBuilder bug #1185
Comments
@mbbee Java classes accessed via JNI need to be registered. See the JNI documentation for details. |
In your case you should add
After that you may need to expand this config file with further classes/methods/fields accessed via JNI. For an automated method of discovering all the elements accessed via JNI look at Assisted Configuration of Native Image Builds. I would suggest to build from source or wait for RC16 which is coming out soon since we have fixed a series of issues with the |
the graalvm-ee-1.0.0-rc16-snapshot-windows-amd64 produces other strange errors when i try to run the command "cmd /c dir" with Process or ProcessBuilder. Maybe an encoding issue:
i also tried native-image-agent which created an empty "jni-config.json " another strage issue: the following statement retrieves a wrong (not existing) directory: |
many problems are gone with native-image-maven-plugin 1.0.0-rc16 |
file.isDirectory() is also buggy, sometimes it works sometimes not
|
and ProcessBuilder doesn't find the "cmd" command |
Have you tried with the 19 release? We have fixed an issue how strings are passed which is likely related to this. |
ProcessBuilder has wrong environment. |
Looks like you opened #1312 for this, closing this issue. |
I'm getting the error below when i use ProcessBuilder in a native image.
Same with eg
Runtime.getRuntime().exec(commandStr, null, workingDir);
I'm using the native-image-maven-plugin version 1.0.0-rc15
thx
The text was updated successfully, but these errors were encountered: