我是Android編程新手。 我的要求是通過HttpClient調用HTTP請求。 下面是代碼:內部錯誤(classFileParser.cpp:3174),pid = 7288,tid = 7476
公共類ClientWithResponseHandler { 公共最終靜態無效的主要(字串[] args)拋出異常{
HttpClient httpclient = new DefaultHttpClient();
HttpGet httpget = new HttpGet("http://www.google.com/");
System.out.println("executing request " + httpget.getURI());
// Create a response handler
ResponseHandler<String> responseHandler = new BasicResponseHandler();
String responseBody = httpclient.execute(httpget, responseHandler);
System.out.println(responseBody);
System.out.println("----------------------------------------");
// When HttpClient instance is no longer needed,
// shut down the connection manager to ensure
// immediate deallocation of all system resources
httpclient.getConnectionManager().shutdown();
}
}
執行上面的代碼作爲Java應用程序後我在控制檯中得到下面的錯誤。
#
已經由Java運行時環境中檢測到致命錯誤:
#
內部錯誤(classFileParser.cpp:3174),PID = 7288,TID = 7476
錯誤:ShouldNotReachHere()
#
JRE版本:6.0_20-B02
Java虛擬機:Java的熱點(TM)客戶端VM(16.3-B01混合模式Windows-x86)的
更多信息的錯誤報告文件保存爲:
C:\桑迪普\日食\工作區\ HelloWebService \ hs_err_pid7288.log
#
如果您想提交錯誤報告,請訪問:
http://java.sun.com/webapps/bugreport/crash.jsp
#
任何想法可能是什麼問題
問候 桑迪普
有嘗試刪除bin和gen目錄(關閉eclipse後),並重建項目? – Nanis 2010-06-24 15:09:00
http://stackoverflow.com/a/2172175/611007 – n611x007 2014-07-02 14:37:11
http://stackoverflow.com/questions/2543106/fatal-error-by-java-runtime-environment?answertab=votes#tab-top – n611x007 2014-07-02 14:38:04