[Android-tools-devel] Bug#832568: apktool fails to run on Java 7 because it was compiled to target Java 8
Simon Ruggier
Simon.Ruggier at gmail.com
Wed Jul 27 00:42:05 UTC 2016
Package: apktool
Version: 2.1.1+dfsg-2
Severity: serious
Justification: Policy 3.5
I just installed apktool, and when I run it, it fails like so:
$ apktool
Exception in thread "main" java.lang.UnsupportedClassVersionError:
org/jf/baksmali/baksmali : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:803)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at brut.androlib.ApktoolProperties.loadProps(ApktoolProperties.java:54)
at brut.androlib.ApktoolProperties.get(ApktoolProperties.java:37)
at brut.androlib.ApktoolProperties.get(ApktoolProperties.java:32)
at brut.androlib.Androlib.getVersion(Androlib.java:656)
at brut.apktool.Main.usage(Main.java:438)
at brut.apktool.Main.main(Main.java:100)
The version 52 suggests that the class was compiled to run on Java 8[1]. My
java alternative points at /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java, so
naturally, this doesn't work.
[1] https://en.wikipedia.org/wiki/Java_class_file
-- System Information:
Debian Release: 8.5
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable'), (102, 'testing'), (101, 'unstable'), (100, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.16.0-4-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
Versions of packages apktool depends on:
ii aapt 21-2
ii android-framework-res 1:6.0.1+r43-1
ii default-jre-headless [java7-runtime-headless] 2:1.7-52
ii libantlr3-runtime-java 3.5.2-5
ii libcommons-cli-java 1.2-3
ii libcommons-io-java 2.4-2
ii libcommons-lang3-java 3.3.2-1
ii libguava-java 17.0-1
ii libjsr305-java 0.1~+svn49-4
ii libsmali-java 2.1.2-1
ii libstringtemplate-java 3.2.1-2
ii libxmlunit-java 1.5-1
ii libxpp3-java 1.1.4c-2
ii libyaml-snake-java 1.12-2
ii openjdk-7-jre-headless [java7-runtime-headless] 7u101-2.6.6-2~deb8u1
apktool recommends no packages.
apktool suggests no packages.
-- no debconf information
More information about the Android-tools-devel
mailing list