nad87563
nad87563

Reputation: 4072

install4j InvalidByteCodeException

I am getting an exception InvalidByteCodeException when I build the installer using relativetest.install4j. I can still run the installer without any issues but I want to get rid of this exception.

C:\Program Files\install4j6\bin>install4jc --win-keystore-password=**** C:/Users/test/Downloads/relativetest.install4j

install4j version 6.1.6 (build 6459), built on 2017-06-29
Registered to i4jlic.ruvos.net, uberops

Loading config file C:/Users/test/Downloads/relativetest.install4j
Creating media file 'STEVE2Client-64bit':
  Collecting files:
  Compiling launchers:
    Compiling launcher 'steve2client':
      Signing executable
      Generating VM options file steve2client.vmoptions.
    Compiling launcher 'steve2client-service':
      Signing executable
      Generating VM options file steve2client-service.vmoptions.
    Compiling launcher 'Reconnect':
      Signing executable
  Creating media file:
    Signing executable
    Preparing custom code & resources JAR file:
    Zipping custom code & resources JAR file
    Identifying components
    Adding JRE (windows-amd64-1.8.0_121)
    Shrinking runtime

    Exception in: module-info
    org.gjt.jclasslib.structures.InvalidByteCodeException: Invalid constant pool type: 19
            at org.gjt.jclasslib.structures.Lookup.getFromTag(Lookup.kt:39)
            at org.gjt.jclasslib.structures.ClassFile.readConstantPool(ClassFile.kt:339)
            at org.gjt.jclasslib.structures.ClassFile.readData(ClassFile.kt:261)
            at org.gjt.jclasslib.structures.Structure.read(Structure.kt:33)
            at org.gjt.jclasslib.io.ClassFileReader.readFromInputStream(ClassFileReader.kt:77)
            at com.ejt.framework.a.m.d(ejt:104)
            at com.ejt.framework.a.ah.d(ejt:36)
            at com.install4j.b.b.o.d(ejt:119)
            at com.install4j.b.b.o.b(ejt:67)
            at com.install4j.b.e.K(ejt:697)
            at com.install4j.b.c.a(ejt:122)
            at com.install4j.b.k.a(ejt:388)
            at com.install4j.b.k.c(ejt:139)
            at com.install4j.Install4JApplication.c(ejt:456)
            at com.a.a.a(ejt:326)
            at com.install4j.Install4JApplication.main(ejt:89)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

Upvotes: 2

Views: 202

Answers (1)

Ingo Kegel
Ingo Kegel

Reputation: 47995

You can either disable runtime shrinking on General Settings->Media file options or switch to install4j 7 which supports Java 9+ class files.

Upvotes: 1

Related Questions