Creating a dumb terminal

I’m stuck on Stage #QP2.

So i did change java version to 17 and add - - enable-native .

i added the - - enable-native on edit config → modify options →add vm options and nothing changed.

i added - - enable-native to pom.xml like this inside compile plug :

–enable-native

and nothing changed , the same error .

it worked when i run java -jar target/.jar , but i want to run it on intellij IDE .

THE ERROR:

Screenshot From 2026-03-26 16-45-29

What could be the solution ?

Hey @ahmadbenali, do you recall what change first triggered this error?

it’s the first time . it worked when i run the app on my terminal but when i run it from intellij, this error appear to me

this is the error when i push the code :

A possibly related post from OpenJDK: JEP 472: Prepare to Restrict the Use of JNI

As mentioned in the test output, --enable-native-access=ALL-UNNAMED will work, but it’ll need to be done on the server side as well. I haven’t worked with Java on CodeCrafters before, so I don’t know if that involves editing a config file in your project or whether you’d have to wait for staff support.

Hey @ahmadbenali, you should be able to resolve this by adding --enable-native-access=ALL-UNNAMED to .codecrafters/run.sh.

Give that a try and let me know if it works!

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.