执行到 这一步的时候 ,DefaultHttpClient httpClient = new DefaultHttpClient(); 报错
执行到 这一步的时候 ,DefaultHttpClient httpClient = new DefaultHttpClient();
报错:
Exception in thread "main" sun.misc.InvalidJarIndexException: Invalid index
at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:939)
at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:848)
at sun.misc.URLClassPath.getResource(URLClassPath.java:199)
at java.net.URLClassLoader$1.run(URLClassLoader.java:358)
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 org.apache.http.impl.client.AbstractHttpClient.<init>(AbstractHttpClient.java:187)
at org.apache.http.impl.client.DefaultHttpClient.<init>(DefaultHttpClient.java:146)
at com.minmate.likang.weixin.util.WeiXinUtil.doGetStr(WeiXinUtil.java:49)
at com.minmate.likang.weixin.util.WeiXinUtil.getToken(WeiXinUtil.java:123)
at com.minmate.likang.weixin.util.Test.main(Test.java:16)