2012-06-18 36 views
0

我有一個Eclipse(基於插件的)應用程序,我嘗試從jnlp文件(我使用maven tycho構建它)開始使用Java 64位。啓動應用程序後不久,它不再響應,有時甚至自動關閉。如果用Java 32bit啓動應用程序,應用程序可以正常工作。使用Java 64位啓動應用程序時收到的PermGen空間錯誤

如果我檢查日誌文件,會得到java.lang.OutOfMemoryError:PermGen空間異常。 我已將MaxPermSize增加到756米,但仍然無法使用。當應用程序被阻止時,我可以看到CPU幾乎達到100%的使用率。

如果您對我能解決問題或解釋有什麼建議,請分享。

謝謝!

+1

請添加您使用的JVM參數的完整列表。 – dbf

+0

您可以使用'-XX:+ PrintGCDetails -XX:+ PrintGCTimeStamps'啓用GC日誌記錄並向我們顯示日誌? –

+0

使用64位JVM(即不使用jnlp)在eclipse中運行時會發生什麼? –

回答

0

我的解決方案是更改爲Java 1.7。我以前曾嘗試使用Java 1.6.0_26_x64和Java 1.6.0_29_x64,並得到上述錯誤。

我現在已經改變爲Java 1.7.0_04_x64,它工作順利,根本沒有阻塞。

編輯:它也適用於Java 1.6.0_33。

0

當您加載許多班時,燙髮空間會被填滿。

從這個FAQ

How can I tell if the permanent generation is filling up?

Starting in 1.4.2 -XX:+PrintGCDetails will print information about all parts of the heap collected at each garbage collection. For a full collection

[Full GC [Tenured: 30437K->33739K(280576K), 0.7050569 secs] 106231K->33739K(362112K), [Perm : 2919K->2919K(16384K)], 0.7052334 secs]

this example shows that little was collected in the permanent generation (it went from 2919K used before the collection to 2919K used after the collection) and the current size of the permanent generation is 16384K.

如果你遭受的類加載器泄漏的,你可能會感興趣的this article"how to fix" article

相關問題