Title: ubuntu-latest uses wrong JDK version · Issue #997 · actions/setup-java · GitHub
Open Graph Title: ubuntu-latest uses wrong JDK version · Issue #997 · actions/setup-java
X Title: ubuntu-latest uses wrong JDK version · Issue #997 · actions/setup-java
Description: Description: When [25] is selected, [17] is used. This issue seems to be specific to steps that use the sudo command. Logs: https://github.com/qzind/tray/actions/runs/23968390243/job/69912859804 Task version: v5 Platform: Ubuntu macOS Wi...
Open Graph Description: Description: When [25] is selected, [17] is used. This issue seems to be specific to steps that use the sudo command. Logs: https://github.com/qzind/tray/actions/runs/23968390243/job/69912859804 Ta...
X Description: Description: When [25] is selected, [17] is used. This issue seems to be specific to steps that use the sudo command. Logs: https://github.com/qzind/tray/actions/runs/23968390243/job/69912859804 Ta...
Opengraph URL: https://github.com/actions/setup-java/issues/997
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ubuntu-latest uses wrong JDK version","articleBody":"**Description:**\nWhen [25] is selected, [17] is used. \n\nThis issue seems to be specific to steps that use the `sudo` command.\n\nLogs:\nhttps://github.com/qzind/tray/actions/runs/23968390243/job/69912859804\n\n**Task version:**\nv5\n\n**Platform:**\n- [x] Ubuntu\n- [ ] macOS\n- [ ] Windows\n\n**Runner type:**\n- [x] Hosted\n- [ ] Self-hosted\n\n**Repro steps:** \nhttps://github.com/qzind/tray/blob/669af6f31f3b6417c32299ea70376afe414825a1/.github/workflows/build.yaml\n\n**Expected behavior:**\nJava 25 is used\n\n**Actual behavior:**\nJava 17 is used","author":{"url":"https://github.com/tresf","@type":"Person","name":"tresf"},"datePublished":"2026-04-04T01:45:25.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":14},"url":"https://github.com/997/setup-java/issues/997"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:30f92318-437b-e9ec-9a72-6f0804ff7d82 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D63E:1B4DEF:139929:1A35B4:6A4C21EA |
| html-safe-nonce | aed7dbf50fa3ca57bc14e2385cf552331e8cda135343a54fe1a74c583640f427 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENjNFOjFCNERFRjoxMzk5Mjk6MUEzNUI0OjZBNEMyMUVBIiwidmlzaXRvcl9pZCI6IjQ2MTM3MzE1NjcxMDQ5NTg5NTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | b3049e1e2ab1a65f4e53e2e2394eac1fff1e5b00ed4a07ce618ceaf0af57cb51 |
| hovercard-subject-tag | issue:4202926745 |
| github-keyboard-shortcuts | repository,issues,actions,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/actions/setup-java/997/issue_layout |
| twitter:image | https://opengraph.githubassets.com/63ad5b00a5e66e2ee6d6d8c81007aa4da158a921ea0bde26ebf0e0d188f5cdaf/actions/setup-java/issues/997 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/63ad5b00a5e66e2ee6d6d8c81007aa4da158a921ea0bde26ebf0e0d188f5cdaf/actions/setup-java/issues/997 |
| og:image:alt | Description: When [25] is selected, [17] is used. This issue seems to be specific to steps that use the sudo command. Logs: https://github.com/qzind/tray/actions/runs/23968390243/job/69912859804 Ta... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | tresf |
| hostname | github.com |
| expected-hostname | github.com |
| None | 1b6b16d04026f131a36d57e3b01d0f4d26a51800edf48bf5ed0256e0ac905511 |
| turbo-cache-control | no-preview |
| go-import | github.com/actions/setup-java git https://github.com/actions/setup-java.git |
| octolytics-dimension-user_id | 44036562 |
| octolytics-dimension-user_login | actions |
| octolytics-dimension-repository_id | 196057608 |
| octolytics-dimension-repository_nwo | actions/setup-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 196057608 |
| octolytics-dimension-repository_network_root_nwo | actions/setup-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f95fb36c72adc940ff991c03531114b2245658d0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width