Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个通常使用 java webstart 运行的 java 应用程序。现在,当我从我的应用程序运行某个 Jasper 报告时,我得到一个内存不足异常,但只有当应用程序使用 webstart 运行时。当我从本地计算机运行我的应用程序时,不使用 webstart,不会发生内存不足异常。
我所做的一些事情是尝试将所有子报表从页眉和页脚带区移动到细节带区(使用 iReport)。我还确保在所有子报表中都使用了缓存。在这种情况下,我还能做些什么来让这个内存异常停止在报告中发生?
您可以尝试在 jnlp 文件中定义更多内存:
<j2se version="1.4+" java-vm-args="-Xms256M -Xmx512M"/>
见这里。