0

我在 netbean 中创建了一个 Javax 应用程序。我正面临着它的内存问题。我有一个表,其中包含需要处理的项目列表,我正在处理多线程中项目的任务。当它一一处理项目时,它会增加系统内存

我对上述过程的发现 Netbean - 将内存从 ~130 到 300mb Jar - 当我使用相同的源代码运行构建 exe 并运行应用程序时,内存从 ~130 到 300mb 并运行应用程序,它需要 300m 到 800mb/1100mb,所以没有我们在设置中传递以下参数的构建 exe....

<target name="CreatingExe" depends="SignedJar">
<fx:deploy width="800" height="600" nativeBundles="all" outdir="${dist}/winx86" outfile="${app.name}" verbose="true">
<fx:info title="${app.title}"/>
<fx:application name="${app.title}" mainClass="${main.class}"/>
<fx:resources>
<fx:fileset dir="${dist}/winx86" includes="*.jar"/>
<fx:fileset dir="${WorkingFolder}/temp"/>
</fx:resources>
<fx:platform>
<fx:jvmarg value="-Xms512m"/>
<fx:jvmarg value="-Xmx1g"/>
<fx:jvmarg value="-XX:NewRatio=2"/>
<fx:jvmarg value="-XX:MaxPermSize=250m"/>
</fx:platform>
</fx:deploy>
</target>

使用这个构建 exe,我捆绑了 jre (java 7) 的副本

我需要添加更多设置以减少内存使用量。

4

0 回答 0