0
我有兩個Java文件。一個叫做X,另一個叫Y(我不能在這裏複製和粘貼長度)。 X使用HtmlUnit來自動瀏覽網頁,Y是一個GUI。當我自己運行X時,我得到了適當的輸出。然而,當我運行Y(其中要求X與其功能),我收到以下錯誤:Java FailingHttpStatusCodeException
Exception in thread "AWT-EventQueue-0" com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException: 500 Internal Server Error for http://www.hmdb.ca/spectra/ms/search
我都試過,但錯誤沒有消失:
webClient.getOptions().setThrowExceptionOnFailingStatusCode(false);
沒有人有任何想法爲什麼X自己工作,但當用GUI運行時,它給我這個運行時錯誤?此外,當我編譯Y,我得到以下信息:
Note: MetaboFrontEnd.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.