使用dalvikvm加载类时拒绝先前失败的类错误的重新初始化

使用dalvikvm加载类时拒绝先前失败的类错误的重新初始化

本文介绍了使用dalvikvm加载类时拒绝先前失败的类错误的重新初始化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我正在尝试在Lollipop 5.1.1上使用Terminal IDE。使用Samsung E7设备,XDA
上的某人在以下位置提供了终端IDE的修改版:



我试图在该mod中使用javac脚本,但是它给出了一个不满意的链接错误,说:



 $ javac 
java.lang.UnsatisfiedLinkError:org.apache.harmony.security.fortress.Services
,位于org.apache.harmony.security.fortress.Engine.getServices(Engine.java:158 )org.apache.harmony.security.fortress.Engine.getInstance(Engine.java:137)的
java.security.cert.CertificateFactory.getInstance(CertificateFactory.java:90)的
b在
上org.apache.harmony.security.utils.JarUtils.verifySignature(JarUtils.java:83)
在java.util.jar.JarVerifier.verifyCertificate(JarVerifier.java:294)
在java.util.jar.JarVerifier.readCertificates(JarVerifier.java:268)
在java.util.jar.JarFile.getInputStream(JarFile.java:380)
在libcore.net.url .JarURLConnectionImpl.getInputStream(JarURLConnectionImpl.java:222)
在java.net.URL.openStream(URL.java:470)
在java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:444)
在java.util.ResourceBundle.handleGetBundle(ResourceBundle.java:515)
在java.util.ResourceBundle.handleGetBundle(ResourceBundle.java:542)
在java.util.ResourceBundle.handleGetBundle( ResourceBundle.java:542)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:228)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:139)
at com .sun.tools.javac.main.JavaCompiler.version(JavaCompiler.java:112)
在com.sun.tools.javac.main.JavaCompiler.version(JavaCompiler.java:97)
在com.sun.tools.javac.main.Main.bugMessage(Main.java:434)
在com.sun.tools.javac.main.Main.compile(Main.java:421)
在com.sun.tools.javac.main.Main.compile(Main.java:308)
在com.sun.tools.javac.main.Main.compile(Main.java:299)
在com.sun.tools.javac.Main.compile(Main.java:82)
在com.spartacusrex.spartacuside.external.javac.main(javac.java:13)
$


奇怪的是,有一个 UnsatisfiedLinkError ,因为它没有说VM无法找到xyz.so库或找不到xyz方法。
我在Device上使用Terminal IDE的 javac 脚本后立即尝试使用 logcat 命令,这很奇怪从那里开始:



 I / art(6558):拒绝对先前失败的类java.lang.Class< org.apache进行重新初始化.harmony.security.fortress.Services> 


我不明白为什么会这样,
javac脚本使用android的 dalvikvm 命令加载



 com.spartacusrex.spartacuside.external.javac 


类。人们在sdk版本 20 + 上遇到了拒绝重新初始化的问题,但是我不清楚为什么此信息消息

解决方案

我复制了 /system/lib/libjavacrypto.so 到Terminal IDE的〜/ system / lib 文件夹,现在javac和dx工具正在运行。
看来Google弄乱了/ system / lib中的内容,导致了错误。
回答,所以其他人可能会觉得有用。


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

I tried to use javac script in that mod 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)
        at
    org.apache.harmony.security.utils.JarUtils.verifySignature(JarUtils.java:83)
        at     java.util.jar.JarVerifier.verifyCertificate(JarVerifier.java:294)
        at     java.util.jar.JarVerifier.readCertificates(JarVerifier.java:268)
        at     java.util.jar.JarFile.getInputStream(JarFile.java:380)
        at     libcore.net.url.JarURLConnectionImpl.getInputStream(JarURLConnectionImpl.java:222)
        at     java.net.URL.openStream(URL.java:470)
        at     java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:444)
        at     java.util.ResourceBundle.handleGetBundle(ResourceBundle.java:515)
        at     java.util.ResourceBundle.handleGetBundle(ResourceBundle.java:542)
        at     java.util.ResourceBundle.handleGetBundle(ResourceBundle.java:542)
        at     java.util.ResourceBundle.getBundle(ResourceBundle.java:228)
        at     java.util.ResourceBundle.getBundle(ResourceBundle.java:139)
        at     com.sun.tools.javac.main.JavaCompiler.version(JavaCompiler.java:112)
        at     com.sun.tools.javac.main.JavaCompiler.version(JavaCompiler.java:97)
        at     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)
        at     com.sun.tools.javac.Main.compile(Main.java:82)
        at     com.spartacusrex.spartacuside.external.javac.main(javac.java:13)
    $

It is strange that there is a UnsatisfiedLinkError , because it doesn't say that VM cannot find xyz.so library or cannot find xyz method.I tried using logcat command right after using Terminal IDE's javac script on Device, the odd thing I found from there is :

I/art     ( 6558) : rejecting re-init on previously-failed class java.lang.Class<org.apache.harmony.security.fortress.Services>

I couldn't understand why this happened,The javac script uses android's dalvikvm command to load

com.spartacusrex.spartacuside.external.javac

class. People have faced this rejecting re-init issue on sdk version 20+ but it's not clear to me why this info message uccurs and how to solve it.

解决方案

I copied /system/lib/libjavacrypto.so to Terminal IDE's ~/system/lib folder and now javac and dx tools are working.It seems like Google messed up with things in /system/lib which resulted in errors.Answering so someone else might find it useful.

这篇关于使用dalvikvm加载类时拒绝先前失败的类错误的重新初始化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 20:25