Skip to content

sjsonnet-0.4.14 has a Warning message about a java.lang.System::loadLibrary call #268

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

Open
polarnik opened this issue Mar 22, 2025 · 1 comment

Comments

@polarnik
Copy link

Download a version 0.4.14

  curl --output ./tools/sjsonnet.jar \
  -L https://github.com/databricks/sjsonnet/releases/download/0.4.14/sjsonnet-0.4.14.jar

and start a tool

./tools/sjsonnet.jar \
--strict --strict-import-syntax --fatal-warnings --throw-error-for-invalid-sets \
--indent 4 --no-duplicate-keys-in-comprehension \
--output-file ./dashboards/generated/workflow.json \
-J vendor \
wokflow.jsonnet

We will see warn messages:

WARNING: A restricted method in java.lang.System has been called
WARNING: java.lang.System::loadLibrary has been called by net.jpountz.util.Native in an unnamed module (file:/tools/sjsonnet.jar)
WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module
WARNING: Restricted methods will be blocked in a future release unless native access is enabled

The source of the problem is:

What do you think is about using

@stephenamar-db
Copy link
Collaborator

You can disable this warning by using
JAVA_OPTS="--enable-native-access=net.jpountz.util" ./tools/sjsonnet.jar ....

This is definitely an annoyance, so I'll keep this open for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants