3

We are using some closed-source commercial application framework that involves a byte-code enhancer. While the byte-code enhancer can process Java 7 byte-code, it requires the use of the "-XX:-UseSplitVerifier" flag when starting the JVM.

We have just updated to using Java 7, and run into the issue that we use WebStart to run our application, and WebStart does not support this -XX:-UseSplitVerifier.

The tech support of the framework provider said that it would be "difficult to solve", which means we cannot expect a corrected version any time soon.

So, my question is: Can those stackmaps be generated somehow for existing classes? Could we plug-in some tool/plugin that re-generate those stackmaps after the application is built, but before it is deployed?

Sebastien Diot
  • 7,183
  • 6
  • 43
  • 85
  • 1
    Compiling or converting your classes for target version 1.6 should avoid this. Not sure how hard/easy/practicable this is in your environment. – Durandal Jan 15 '14 at 17:01
  • @Durandal This is currently our (only possible?) work-around. Still, the question is interesting; if it's possible to use some API and manipulate bytecode, and have the API generate the Stackmap, it follows that it should be possible to use the same API and generate the Stackmap *without manipulating* the classes. – Sebastien Diot Jan 15 '14 at 17:13
  • In theory the (cursed) stack maps can be calculated from the bytecodes. It would be a substantial task, though -- basically write your own version of the Java bytecode verifier. (As to why Sun decided to require the things in the first place, it's because they didn't know how to write fast verifiers.) – Hot Licks Jan 15 '14 at 23:21

1 Answers1

2

ASM bytecode framework can help with recalculating StackMap structures. The only catch is to provide your own facility to resolve common super types.

Eugene Kuleshov
  • 31,461
  • 5
  • 66
  • 67