Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-dev] pack200 support

i was curious so i took the eclipse plugins dir:

427 jar files total tize is 483MB

i could get that to work nicely for compress 1.20 (that still uses the pack200 of java itself)

but for 1.21 that always fails for me..
i guess it somewhat related to the ASM that must be used to read that stuff

it seems that commons-compress uses Maven Repository: asm » asm » 3.2 (mvnrepository.com)

(at least thats there compile dependency) but that is very old

which should work even for the very latest java versions
i get loads of errors


java.lang.ArrayIndexOutOfBoundsException: Index 6 out of bounds for length 0
at org.objectweb.asm.ClassReader.readShort(ClassReader.java:3608)
at org.objectweb.asm.ClassReader.<init>(ClassReader.java:197)
at org.objectweb.asm.ClassReader.<init>(ClassReader.java:180)
at org.objectweb.asm.ClassReader.<init>(ClassReader.java:166)
at org.apache.commons.compress.harmony.pack200.Pack200ClassReader.<init>(Pack200ClassReader.java:35)
at org.apache.commons.compress.harmony.pack200.Archive.addJarEntry(Archive.java:193)
at org.apache.commons.compress.harmony.pack200.Archive.splitIntoSegments(Archive.java:150)
at org.apache.commons.compress.harmony.pack200.Archive.doNormalPack(Archive.java:121)
at org.apache.commons.compress.harmony.pack200.Archive.pack(Archive.java:99)
at org.apache.commons.compress.harmony.pack200.Pack200PackerAdapter.pack(Pack200PackerAdapter.java:58)
at org.apache.commons.compress.compressors.pack200.Pack200CompressorOutputStream.finish(Pack200CompressorOutputStream.java:136)
at org.apache.commons.compress.compressors.pack200.Pack200CompressorOutputStream.close(Pack200CompressorOutputStream.java:118)
at main.Main.main(Main.java:58)


and

Exception in thread "main" java.lang.IncompatibleClassChangeError: class org.apache.commons.compress.harmony.pack200.Segment can not implement org.objectweb.asm.ClassVisitor, because it is not an interface (org.objectweb.asm.ClassVisitor is in unnamed module of loader 'app')
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:800)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:698)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:621)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:579)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
at org.apache.commons.compress.harmony.pack200.Archive.doNormalPack(Archive.java:129)
at org.apache.commons.compress.harmony.pack200.Archive.pack(Archive.java:99)
at org.apache.commons.compress.harmony.pack200.Pack200PackerAdapter.pack(Pack200PackerAdapter.java:58)
at org.apache.commons.compress.compressors.pack200.Pack200CompressorOutputStream.finish(Pack200CompressorOutputStream.java:136)
at org.apache.commons.compress.compressors.pack200.Pack200CompressorOutputStream.close(Pack200CompressorOutputStream.java:118)
at main.Main.main(Main.java:58)

so maybe i do something wrong

it even doesn't matter which java version i take (i tried java 11, 14 and 16)


On Tue, 13 Jul 2021 at 08:56, Aleksandar Kurtakov <akurtako@xxxxxxxxxx> wrote:


On Tue, Jul 13, 2021 at 9:40 AM Christoph Läubrich <laeubi@xxxxxxxxxxxxxx> wrote:
As we recently discussed missing pack200 support, I stumbled about
commons-compress announcing support for pack200 (reading and writing if
I understand correctly):

https://commons.apache.org/proper/commons-compress/
https://commons.apache.org/proper/commons-compress/apidocs/org/apache/commons/compress/compressors/pack200/package-summary.html

So i wonder if we at least support reading pack200 artifacts?

It would be nice if there were some measurements how much it helps with newer/latest JVMs/bytecode first. After that p2 should be ported to use commons compress too as without it support in tycho only wouldn't help much.
 
_______________________________________________
tycho-dev mailing list
tycho-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/tycho-dev



--
Aleksandar Kurtakov
Red Hat Eclipse Team
_______________________________________________
tycho-dev mailing list
tycho-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/tycho-dev

Back to the top