On Fri, 25 Sep 2026 06:36:50 GMT, Jaikiran Pai <[email protected]> wrote:

> Can I please get a review of this change which proposes to improve the error 
> message when a JAR file with no manifest is used to launch a java application 
> using `java -jar <jarfile>` command? This addresses 
> https://bugs.openjdk.org/browse/JDK-8392966.
> 
> With the changes in this PR, for a JAR without a manifest file, if it is 
> launched using `java -jar foo.jar` command then the error message will now 
> say:
> 
>> Error: No manifest in JAR file foo.jar
> 
> An existing jtreg test has been converted to junit and a new test method has 
> been introduced to verify this change. tier1, tier2 and tier3 continue to 
> pass after this change.
> 
> 
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

This pull request has now been integrated.

Changeset: e1845f56
Author:    Jaikiran Pai <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/e1845f56f67f8bf956c7839f0fa8e714ccdf512d
Stats:     169 lines in 4 files changed: 61 ins; 28 del; 80 mod

8392966: Improve the error message from "java -jar" for JAR files without a 
manifest

Reviewed-by: cstein, alanb

-------------

PR: https://git.openjdk.org/jdk/pull/33064

Reply via email to