-
Bug
-
Resolution: Duplicate
-
P2
-
None
-
8u151
-
x86
-
linux_ubuntu
ADDITIONAL SYSTEM INFORMATION :
Ubuntu 16.04 and Windows 10
A DESCRIPTION OF THE PROBLEM :
Cannot read manifest entries from jar file.
REGRESSION : Last worked in version 8u151
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Bundle the class and the manifest file in a jar file and launch: java -jar test.jar
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
It should print "Main job catol"
ACTUAL -
It always prints "null".
---------- BEGIN SOURCE ----------
put the following code in a method, create an instance and call from main:
InputStream stream = getClass().getClassLoader().getResourceAsStream("META-INF/MANIFEST.MF");
Manifest manifest = new Manifest(stream);
Attributes attributes = manifest.getMainAttributes();
System.out.System.out.println( attributes.getValue("Implementation-Title") );
---------------------------------------------
Content of META-INF/MANIFEST.MF:
Manifest-Version: 1.0
Implementation-Title: Main job catol
Implementation-Version: SNAPSHOT
Implementation-Vendor-Id: it.next.catol
Specification-Title: Main job catol
Created-By: Apache Maven 3.3.9
Build-Jdk: 1.8.0_151
Specification-Version: 0.0.1-SNAPSHOT
X-SCM-Revision: DEV
-------
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Roll back to jdk8u151
FREQUENCY : always
Ubuntu 16.04 and Windows 10
A DESCRIPTION OF THE PROBLEM :
Cannot read manifest entries from jar file.
REGRESSION : Last worked in version 8u151
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Bundle the class and the manifest file in a jar file and launch: java -jar test.jar
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
It should print "Main job catol"
ACTUAL -
It always prints "null".
---------- BEGIN SOURCE ----------
put the following code in a method, create an instance and call from main:
InputStream stream = getClass().getClassLoader().getResourceAsStream("META-INF/MANIFEST.MF");
Manifest manifest = new Manifest(stream);
Attributes attributes = manifest.getMainAttributes();
System.out.System.out.println( attributes.getValue("Implementation-Title") );
---------------------------------------------
Content of META-INF/MANIFEST.MF:
Manifest-Version: 1.0
Implementation-Title: Main job catol
Implementation-Version: SNAPSHOT
Implementation-Vendor-Id: it.next.catol
Specification-Title: Main job catol
Created-By: Apache Maven 3.3.9
Build-Jdk: 1.8.0_151
Specification-Version: 0.0.1-SNAPSHOT
X-SCM-Revision: DEV
-------
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Roll back to jdk8u151
FREQUENCY : always
- duplicates
-
JDK-8193522 meta-index in 1.8.0_152 does not include jfxrt.jar entries
-
- Closed
-
-
JDK-8200112 null value when trying to read a manifest file property
-
- Closed
-
- relates to
-
JDK-8193522 meta-index in 1.8.0_152 does not include jfxrt.jar entries
-
- Closed
-