• <i id='0F3DP'><tr id='0F3DP'><dt id='0F3DP'><q id='0F3DP'><span id='0F3DP'><b id='0F3DP'><form id='0F3DP'><ins id='0F3DP'></ins><ul id='0F3DP'></ul><sub id='0F3DP'></sub></form><legend id='0F3DP'></legend><bdo id='0F3DP'><pre id='0F3DP'><center id='0F3DP'></center></pre></bdo></b><th id='0F3DP'></th></span></q></dt></tr></i><div id='0F3DP'><tfoot id='0F3DP'></tfoot><dl id='0F3DP'><fieldset id='0F3DP'></fieldset></dl></div>

    <small id='0F3DP'></small><noframes id='0F3DP'>

  • <tfoot id='0F3DP'></tfoot>

          <bdo id='0F3DP'></bdo><ul id='0F3DP'></ul>
      1. <legend id='0F3DP'><style id='0F3DP'><dir id='0F3DP'><q id='0F3DP'></q></dir></style></legend>

        减小 JRE 的大小

        时间:2023-08-24
        • <bdo id='hNNoI'></bdo><ul id='hNNoI'></ul>

                <small id='hNNoI'></small><noframes id='hNNoI'>

                <i id='hNNoI'><tr id='hNNoI'><dt id='hNNoI'><q id='hNNoI'><span id='hNNoI'><b id='hNNoI'><form id='hNNoI'><ins id='hNNoI'></ins><ul id='hNNoI'></ul><sub id='hNNoI'></sub></form><legend id='hNNoI'></legend><bdo id='hNNoI'><pre id='hNNoI'><center id='hNNoI'></center></pre></bdo></b><th id='hNNoI'></th></span></q></dt></tr></i><div id='hNNoI'><tfoot id='hNNoI'></tfoot><dl id='hNNoI'><fieldset id='hNNoI'></fieldset></dl></div>
                <tfoot id='hNNoI'></tfoot>

                    <tbody id='hNNoI'></tbody>
                  <legend id='hNNoI'><style id='hNNoI'><dir id='hNNoI'><q id='hNNoI'></q></dir></style></legend>
                  本文介绍了减小 JRE 的大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我们将 Java 6 JRE 与我们的应用程序安装程序捆绑在一起,以便它可以在任何机器上运行,但这会使应用程序更重一些.所以我们计划减小 JRE 的大小.如果有人做过此类任务,您能否提供指导以推进此任务?

                  We bundle the Java 6 JRE with our application installer so that it can be run on any machine, but this makes the application a little bit heavier. So we are planning to reduce the size of the JRE. If anyone has done this sort of task, can you please provide guidance to move forward with this?

                  推荐答案

                  查看JRE目录下的README文件.如果您将 Oracle/Sun JRE 与应用程序打包在一起,则可选文件和目录"部分列出了可以从 Oracle/Sun JRE 中删除的一些文件.

                  Look at the README file in the JRE directory. The 'Optional Files and Directories' section lists a number of files that can be removed from the Oracle/Sun JRE if you are packaging it with your application.

                  创建安装时,我使用 Ant 构建文件将 JRE 从系统安装位置复制到包目录.将要排除的文件列表放在单独的文件中,并使用excludesfile"属性加载此列表:

                  I use an Ant buildfile to copy the JRE from the system install location to the package directory when creating an installation. Put the list of files you want excluded in a separate file and use the 'excludesfile' attribute to load this list:

                  <copy todir="${deployed_jre_dir}">
                    <fileset dir="${system_jre_dir}" excludesfile="jre_excludes.properties" 
                  </copy>
                  

                  示例 jre_excludes.properties 文件:

                  Sample jre_excludes.properties file:

                  # per the README from the JRE, these files are for the browser plugin and are not needed otherwise
                  #bin/javaw.exe
                  bin/javaws.exe
                  bin/javacpl.exe
                  bin/jucheck.exe
                  bin/jusched.exe
                  bin/wsdetect.dll
                  bin/NPJPI*.dll
                  bin/NPJava*
                  bin/NPOJI610.dll
                  bin/RegUtils.dll
                  bin/axbridge.dll
                  bin/deploy.dll
                  bin/jpicom.dll
                  bin/javacpl.cpl
                  bin/jpiexp.dll
                  bin/jpinscp.dll
                  bin/jpioji.dll
                  bin/jpishare.dll
                  lib/deploy.jar
                  lib/plugin.jar
                  lib/javaws.jar
                  lib/javaws/messages*
                  lib/javaws/miniSplash.jpg
                  bin/new_plugin**
                  bin/jureg*
                  bin/ssv*
                  bin/jqs*
                  bin/jp2*
                  lib/deploy/**/*
                  
                  # if you do not need any RMI stuff
                  # wildcard to catch .exe files on Windows
                  # note rmi.dll is not excluded, which is needed by jconsole; add rmi.dll if you do not need jsonsole
                  bin/jbroker*
                  bin/java-rmi*
                  bin/rmid*
                  bin/rmiregistry*
                  bin/tnameserv*
                  bin/orbd*
                  bin/servertool*
                  
                  # do not include QuickTime
                  # this will be in the jre dir for machines that have QT installed
                  lib/ext/QTJava.zip
                  

                  这篇关于减小 JRE 的大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何隐藏警告“非法反射访问"在没有 JVM 参数的 java 9 中? 下一篇:Oop Maps 在 Hotspot VM 中的确切含义是什么

                  相关文章

                    <bdo id='mhN4D'></bdo><ul id='mhN4D'></ul>

                  <small id='mhN4D'></small><noframes id='mhN4D'>

                  <tfoot id='mhN4D'></tfoot>

                    1. <i id='mhN4D'><tr id='mhN4D'><dt id='mhN4D'><q id='mhN4D'><span id='mhN4D'><b id='mhN4D'><form id='mhN4D'><ins id='mhN4D'></ins><ul id='mhN4D'></ul><sub id='mhN4D'></sub></form><legend id='mhN4D'></legend><bdo id='mhN4D'><pre id='mhN4D'><center id='mhN4D'></center></pre></bdo></b><th id='mhN4D'></th></span></q></dt></tr></i><div id='mhN4D'><tfoot id='mhN4D'></tfoot><dl id='mhN4D'><fieldset id='mhN4D'></fieldset></dl></div>
                      <legend id='mhN4D'><style id='mhN4D'><dir id='mhN4D'><q id='mhN4D'></q></dir></style></legend>