Skip to content

Java warnings when running Jenkins agents with Java 25 #4359

Description

@richardlau

e.g.

root@test-hetzner-ubuntu2404-x64-1 ~ # java -version
openjdk version "25.0.3" 2026-04-21
OpenJDK Runtime Environment (build 25.0.3+9-2-24.04.2-Ubuntu)
OpenJDK 64-Bit Server VM (build 25.0.3+9-2-24.04.2-Ubuntu, mixed mode, sharing)
root@test-hetzner-ubuntu2404-x64-1 ~ # systemctl status jenkins.service
● jenkins.service - Jenkins agent
     Loaded: loaded (/usr/lib/systemd/system/jenkins.service; enabled; preset: enabled)
     Active: active (running) since Tue 2026-06-09 06:50:43 CEST; 9h ago
   Main PID: 84335 (java)
      Tasks: 36 (limit: 76800)
     Memory: 201.5M (peak: 203.4M)
        CPU: 2min 54.671s
     CGroup: /system.slice/jenkins.service
             └─84335 /usr/bin/java -Xmx128m -jar /home/iojs/agent.jar -url https://ci.nodejs.org -name test-hetzner-ubuntu2404-x64-1 -secret e357745ed8badc1076eb653e7506902403e5c2e6f68e994f082e7685dc50a236

Jun 09 06:50:44 test-hetzner-ubuntu2404-x64-1 java[84335]: Jun 09, 2026 6:50:44 AM org.jenkinsci.remoting.protocol.impl.BIONetworkLayer$Reader run
Jun 09 06:50:44 test-hetzner-ubuntu2404-x64-1 java[84335]: INFO: Waiting for ProtocolStack to start.
Jun 09 06:50:45 test-hetzner-ubuntu2404-x64-1 java[84335]: Jun 09, 2026 6:50:45 AM hudson.remoting.Launcher$CuiListener status
Jun 09 06:50:45 test-hetzner-ubuntu2404-x64-1 java[84335]: INFO: Remote identity confirmed: 4f:22:06:c2:64:29:f3:3f:6d:7c:d7:01:f2:18:bb:93
Jun 09 06:50:45 test-hetzner-ubuntu2404-x64-1 java[84335]: Jun 09, 2026 6:50:45 AM hudson.remoting.Launcher$CuiListener status
Jun 09 06:50:45 test-hetzner-ubuntu2404-x64-1 java[84335]: INFO: Connected
Jun 09 06:51:01 test-hetzner-ubuntu2404-x64-1 java[84335]: WARNING: A restricted method in java.lang.System has been called
Jun 09 06:51:01 test-hetzner-ubuntu2404-x64-1 java[84335]: WARNING: java.lang.System::load has been called by com.sun.jna.Native in an unnamed module
Jun 09 06:51:01 test-hetzner-ubuntu2404-x64-1 java[84335]: WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module
Jun 09 06:51:01 test-hetzner-ubuntu2404-x64-1 java[84335]: WARNING: Restricted methods will be blocked in a future release unless native access is enabled
root@test-hetzner-ubuntu2404-x64-1 ~ #

I don't think this causes us problems today, but may be a problem with a "future release" of Java.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions