ClassLoader exception when running ant on windows with java 1.8

旧城冷巷雨未停 提交于 2019-12-11 11:55:54

问题


I ran into this issue when running ant on a windows system with java 1.8.60. This was working fine when running java 1.7.25. Even more interesting : it runs fine when executed on a mac?

I am kind of lost since there is not much pointing me towards a cause of this problem.

Error occurred during initialization of VM
java.lang.ExceptionInInitializerError
        at java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:1448)
        at java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:1433)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 0
        at java.lang.String.charAt(String.java:658)
        at sun.misc.MetaIndex.registerDirectory(MetaIndex.java:184)
        at sun.misc.Launcher$ExtClassLoader$1.run(Launcher.java:146)
        at sun.misc.Launcher$ExtClassLoader$1.run(Launcher.java:142)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.misc.Launcher$ExtClassLoader.getExtClassLoader(Launcher.java:141)
        at sun.misc.Launcher.<init>(Launcher.java:71)
        at sun.misc.Launcher.<clinit>(Launcher.java:57)
        at java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:1448)
        at java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:1433)

回答1:


Sure the JVM was installed properly? We had the same problem when the JVM was installed via a repository (CVS) which converted some text-files from/to DOS/UNIX format.



来源:https://stackoverflow.com/questions/32356738/classloader-exception-when-running-ant-on-windows-with-java-1-8

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!