Rejection of reinitialization of a previously failed class error when loading a class with dalvikvm

I am trying to use the Terminal IDE on Lollipop 5.1.1. Using a Samsung E7 device, the version of the IDE terminal modem is provided by someone from the XDA Here: http://forum.xda-developers.com/showthread.php?t=1340852&page=7

I tried using a javac script in this module, but it gave an unsatisfied link error saying that:

  $ javac
  java.lang.UnsatisfiedLinkError: org.apache.harmony.security.fortress.Services at org.apache.harmony.security.fortress.Engine.getServices (Engine.java:158) at org.apache.harmony.security.fortress.Engine .getInstance (Engine.java:137) at java.security.cert.CertificateFactory.getInstance (CertificateFactory.java:90) in org.apache.harmony.security.utils.JarUtils.verifySignature (JarUtils.java:83) in java. util.jar.JarVerifier.verifyCertificate (JarVerifier.java:294) on java.util.jar.JarVerifier.readCertificates (JarVerifier.java:268) in java.util.jar.JarFile.getInputStream (JarFile.javahaps80) lib .net.url.JarURLConnectionImpl.getInputStream (JarURLConnectionImpl.java:222) in java.net.URL.openStream (URL.java-00-0070) in java.lang.ClassLoader.getResourceAsStream (ClassLoader.java:444) in java.util. ResourceBundle.handleGetBundle (ResourceBundle.java UP15) in java.util.ResourceBundle.handleGetBundle (ResourceBundle.java UP42) in  java.util.ResourceBundle.handleGetBundle (ResourceBundle.java UP42) in java.util.ResourceBundle.getBundle (ResourceBundle.java:228) in java.util.ResourceBundle.getBundle (ResourceBundle.java:139t) on com.s .javac.main.JavaCompiler.version (JavaCompiler.java:112) on com.sun.tools.javac.main.JavaCompiler.version (JavaCompiler.java:97) on com.sun.tools.javac.main.Main.bugMessage (Main.java:434) at com.sun.tools.javac.main.Main.compile (Main.java:421) at com.sun.tools.javac.main.Main.compile (Main.java:308) at com.sun.tools.javac.main.Main.compile (Main.java:299) on com.sun.tools.javac.Main.compile (Main.java:82) on com.spartacusrex.spartacuside.external.javac. main (javac.java:13) $ 

It is strange that an UnsatisfiedLinkError exists, because it does not say that the VM cannot find the xyz.so library or cannot find the xyz method. I tried using the logcat command right after using the Terminal IDE javac script on the device, the weird thing I found from here:

  I / art (6558): refusal to reinitialize in a previously failed class java.lang.Class <org.apache.harmony.security.fortress.Services> 

I could not understand why this happened, Javac script uses android dalvikvm to load

  com.spartacusrex.spartacuside.external.javac 

class. People have encountered this problem rejecting re-init on sdk 20+ , but I don’t understand why this is an uccurs informational message and how to solve it.

+2
source share
1 answer

I copied /system/lib/libjavacrypto.so to the Terminal IDE ~/system/lib folder and the javac and dx tools now work. It looks like Google messed up things in / system / lib, which led to errors. Answering so that someone else might find this helpful.

+1
source

Source: https://habr.com/ru/post/1207062/


All Articles