We updated ProGuard 6.0.3 to support the Java 11 major number. ProGuard compiles and works correctly without reporting an unsupported compilation. However, when we compile our code with Java 11 (openjdk) we get thousands of can't find referenced [field|method] errors. When we compille with OpenJDK Java 10, running our new version of ProGuard, we have no errors. I suspect this is due to the class file change that was introduced in Java 11 (https://bugs.openjdk.java.net/browse/JDK-8010319).
A workaround is to compile using the Java 11 compiler and use the --release 10 flag when compiling which will output Java 10 compatible classes. ProGuard is then able to shrink/optimize/obfuscate without errors using the Java 11 jmods and our Java 10 classes.
Are there any plans and a timeframe for fully supporting Java 11 in ProGuard?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
We updated ProGuard 6.0.3 to support the Java 11 major number. ProGuard
compiles and works correctly without reporting an unsupported compilation.
However, when we compile our code with Java 11 (openjdk) we get thousands
of can't find referenced [field|method] errors. When we compille with
OpenJDK Java 10, running our new version of ProGuard, we have no errors. I
suspect this is due to the class file change that was introduced in Java 11
(https://bugs.openjdk.java.net/browse/JDK-8010319).
A workaround is to compile using the Java 11 compiler and use the --release
10 flag when compiling which will output Java 10 compatible classes.
ProGuard is then able to shrink/optimize/obfuscate without errors using the
Java 11 jmods and our Java 10 classes.
Are there any plans and a timeframe for fully supporting Java 11 in
ProGuard?
Yes, ProGuard will support Java 11. The changes in the bytecode specifications are far-reaching, so it's not just a small fix and it will take time. I'll add a feature request for reference.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yup. 6.10beta2 works with java11. I no longer need the --release 10 javac flag. However, I get an error when shrinking:
ProGuard, version 6.1.0 beta2
Reading input...
Reading program jar …
Reading library directory …
Reading library directory …
Initializing...
Ignoring unused library classes...
Original number of library classes: 39493
Final number of library classes: 1516
Inlining subroutines...
Shrinking...
Exception in thread "main" java.lang.NullPointerException
at proguard.shrink.UsageMarker.isUsed(UsageMarker.java:1198)
at proguard.shrink.ClassShrinker.shrinkConstantIndexArray(ClassShrinker.java:468)
at proguard.shrink.ClassShrinker.visitNestMembersAttribute(ClassShrinker.java:215)
at proguard.classfile.attribute.NestMembersAttribute.accept(NestMembersAttribute.java:64)
at proguard.classfile.ProgramClass.attributesAccept(ProgramClass.java:619)
at proguard.shrink.ClassShrinker.visitProgramClass(ClassShrinker.java:113)
at proguard.classfile.visitor.MultiClassVisitor.visitProgramClass(MultiClassVisitor.java:67)
at proguard.shrink.UsedClassFilter.visitProgramClass(UsedClassFilter.java:62)
at proguard.classfile.ProgramClass.accept(ProgramClass.java:430)
at proguard.classfile.ClassPool.classesAccept(ClassPool.java:125)
at proguard.shrink.Shrinker.execute(Shrinker.java:158)
at proguard.ProGuard.shrink(ProGuard.java:392)
at proguard.ProGuard.execute(ProGuard.java:146)
Of course, I can get around this error by using the --dontshrink option which only increases my program by about a meg.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Unfortunately, while 6.1.0beta2 obfuscates successfully without shrinking, my program crashes when running on OS X 10.14. If I use the '--release 10' javac flag, then shrinking works, obfuscation works, and my program works. So for now, I guess I will have to stick with that flag during compilation.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
We updated ProGuard 6.0.3 to support the Java 11 major number. ProGuard compiles and works correctly without reporting an unsupported compilation. However, when we compile our code with Java 11 (openjdk) we get thousands of can't find referenced [field|method] errors. When we compille with OpenJDK Java 10, running our new version of ProGuard, we have no errors. I suspect this is due to the class file change that was introduced in Java 11 (https://bugs.openjdk.java.net/browse/JDK-8010319).
A workaround is to compile using the Java 11 compiler and use the --release 10 flag when compiling which will output Java 10 compatible classes. ProGuard is then able to shrink/optimize/obfuscate without errors using the Java 11 jmods and our Java 10 classes.
Are there any plans and a timeframe for fully supporting Java 11 in ProGuard?
Yeah - I'd love to see this too.
On Thu, 9 Aug 2018 at 14:53, J Theisen jtsf11@users.sourceforge.net wrote:
Yes, ProGuard will support Java 11. The changes in the bytecode specifications are far-reaching, so it's not just a small fix and it will take time. I'll add a feature request for reference.
Hi, Is there an update on Java 11 support?
Hi, I just tried 6.1.0beta2 and it worked for me with JDK11.0.1.
Yup. 6.10beta2 works with java11. I no longer need the --release 10 javac flag. However, I get an error when shrinking:
ProGuard, version 6.1.0 beta2
Reading input...
Reading program jar …
Reading library directory …
Reading library directory …
Initializing...
Ignoring unused library classes...
Original number of library classes: 39493
Final number of library classes: 1516
Inlining subroutines...
Shrinking...
Exception in thread "main" java.lang.NullPointerException
at proguard.shrink.UsageMarker.isUsed(UsageMarker.java:1198)
at proguard.shrink.ClassShrinker.shrinkConstantIndexArray(ClassShrinker.java:468)
at proguard.shrink.ClassShrinker.visitNestMembersAttribute(ClassShrinker.java:215)
at proguard.classfile.attribute.NestMembersAttribute.accept(NestMembersAttribute.java:64)
at proguard.classfile.ProgramClass.attributesAccept(ProgramClass.java:619)
at proguard.shrink.ClassShrinker.visitProgramClass(ClassShrinker.java:113)
at proguard.classfile.visitor.MultiClassVisitor.visitProgramClass(MultiClassVisitor.java:67)
at proguard.shrink.UsedClassFilter.visitProgramClass(UsedClassFilter.java:62)
at proguard.classfile.ProgramClass.accept(ProgramClass.java:430)
at proguard.classfile.ClassPool.classesAccept(ClassPool.java:125)
at proguard.shrink.Shrinker.execute(Shrinker.java:158)
at proguard.ProGuard.shrink(ProGuard.java:392)
at proguard.ProGuard.execute(ProGuard.java:146)
Of course, I can get around this error by using the --dontshrink option which only increases my program by about a meg.
Unfortunately, while 6.1.0beta2 obfuscates successfully without shrinking, my program crashes when running on OS X 10.14. If I use the '--release 10' javac flag, then shrinking works, obfuscation works, and my program works. So for now, I guess I will have to stick with that flag during compilation.
Is there a timeline when we can expect a deployable production version ?