<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                [TOC] # 簡介 在每一個JVM進程里面都會存在一個Runtime類的對象, 這個類的主要功能是取得一些與運行時有關的環境屬性或者創建新的進程等操作 在Runtime類定義的時候它的構造方法已經被私有化了,這就屬于單例設計模式,只有一個Runtime類對象. 所以在Runtime類里面提供一個static型的方法,實例化對象: `public static Runtime getRuntime();` Runtime類是直接與本地運行有關的所有相關屬性的集合,所以定義了以下的方法: # 方法 ~~~ public long totalMemory(); //返回所有可用內存 public long maxMemory(); //返回最大可用內存空間 public long freeMemory(); //返回空余內存空間 public native void gc(); //釋放垃圾 ~~~ 他可以調用本機可執行程序,可以創建進程 ~~~ public Process exec(String command) throws IOException ~~~ 案例 ~~~ Runtime runtime = Runtime.getRuntime(); System.out.println("MAX: " + runtime.maxMemory()); System.out.println("free: " + runtime.freeMemory()); System.out.println("total: " + runtime.totalMemory()); ~~~ ~~~ public static void main(String[] args) throws IOException, InterruptedException { Runtime runtime = Runtime.getRuntime(); //調用畫圖程序 Process pro = runtime.exec("mspaint.exe"); Thread.sleep(2000); //銷毀進程 pro.destroy(); } ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看