JDK-6981776 : Pack200 must support -target 7 bytecodes
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.util.jar
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2010-09-02
  • Updated: 2017-05-16
  • Resolved: 2012-05-14
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8 b38Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
It is likely that the Pack200 driver will crash on inputs which include new JDK 7 bytecode features, such as those introduced by JSR 292.

These features include:

- invokedynamic instructions
- CONSTANT_InvokeDynamic CP entries
- CONSTANT_MethodHandle CP entries
- CONSTANT_MethodType CP entries

The JSR 200 EG needs to issue a maintenance release that takes into account these new formats, especially the new CP entry types.

Perhaps the new Pack200 format should "future proof" the CP by allowing layout declarations for unknown CP types.  On the other hand, JDK 8 is likely to include unforeseeable class file changes, so a a maintenance release for JDK 8 is desirable also.

Comments
SQE has looked at the fix and decided no additional tests are needed
09-09-2013

EVALUATION There are really 2 parts to this: 1. We need to make the necessary adjustments to the Pack file format, currently in jdk7 we have only the Class file format change specfic to invoke dynmaci which is experimental. Therefore it is best to address this in jdk8 along with other Class file changes. 2. For the interim ie. for jdk7 we should make the pack200 allow those classes with the new CP entries be passed through seamlessly, this of course will have the disadvantage of slightly larger pack file, but in an application there should not be very many classes with new jdk7 class files. See
03-09-2010

WORK AROUND File which fail to compress due to new classfile features can be passed bitwise (--pass-file option). This may need to be configured manually, which is a burden to the user.
02-09-2010