Java 9+ multi-release jars are not supported in ant tasks
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ant (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Xenial |
New
|
Medium
|
Unassigned | ||
Bionic |
Fix Released
|
Medium
|
Unassigned | ||
Cosmic |
Fix Released
|
Medium
|
Unassigned | ||
Disco |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Reproduced in release: Ubuntu 18.04.1 LTS
Version of ant used: 1.10.3-1ubuntu0.1
Having a multi-release jar with different .class files for Java 8 and Java 9, when using this jar in a custom ant task and running in Java 9+, the Java 8 class file will be loaded instead of the Java 9 one. This may lead to errors when the older class uses a deprecated/removed API.
This can be easily reproduced using the code pushed to this repository: https:/
This issue have already been reported in the ant bug tracker:
https:/
It has already been fixed and will be introduced in next release 1.10.6:
https:/
description: | updated |
tags: | added: patch patch-accepted-upstream |
Changed in ant (Ubuntu Xenial): | |
importance: | Undecided → Medium |
Changed in ant (Ubuntu Bionic): | |
importance: | Undecided → Medium |
Changed in ant (Ubuntu Cosmic): | |
importance: | Undecided → Medium |
Changed in ant (Ubuntu Disco): | |
importance: | Undecided → Medium |
Changed in ant (Ubuntu Cosmic): | |
status: | New → Fix Committed |
Changed in ant (Ubuntu Bionic): | |
status: | New → Fix Committed |
Changed in ant (Ubuntu Cosmic): | |
status: | Fix Committed → Fix Released |
Status changed to 'Confirmed' because the bug affects multiple users.