學習,融通,構(gòu)建自己的知識體系  
          日歷
          <2007年12月>
          2526272829301
          2345678
          9101112131415
          16171819202122
          23242526272829
          303112345
          統(tǒng)計
          • 隨筆 - 2
          • 文章 - 0
          • 評論 - 0
          • 引用 - 0

          導航

          常用鏈接

          留言簿(1)

          隨筆檔案

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

           

          2007年12月27日

            用JAVA很久,但一直沒有了解JAVA.exe這個玩意兒
            今天偶然用了一下,一點小小心得
            1,參數(shù)傳遞
              java命令使用 -D參數(shù)名=參數(shù)值 來傳遞
               java -Dyourname="%JAVA_HOME%" yourclass
              java程序中使用獲得
               System.getProperty("yourname");
              這個在很多應用中有體現(xiàn)
               
            2,設(shè)置初始堆棧
              java有個命令可以看如何設(shè)置
              java -X
              E:>java -X
              -Xmixed           mixed mode execution (default)
              -Xint             interpreted mode execution only
              -Xbootclasspath:<directories and zip/jar files separated by ;>
                                set search path for bootstrap classes and resources
              -Xbootclasspath/a:<directories and zip/jar files separated by ;>
                                append to end of bootstrap class path
              -Xbootclasspath/p:<directories and zip/jar files separated by ;>
                                prepend in front of bootstrap class path
              -Xnoclassgc       disable class garbage collection
              -Xincgc           enable incremental garbage collection
              -Xloggc:<file>    log GC status to a file with time stamps
              -Xbatch           disable background compilation
              -Xms<size>        set initial Java heap size
              -Xmx<size>        set maximum Java heap size
              -Xss<size>        set java thread stack size
              -Xprof            output cpu profiling data
              -Xfuture          enable strictest checks, anticipating future default
              -Xrs              reduce use of OS signals by Java/VM (see documentation)
              -Xcheck:jni       perform additional checks for JNI functions
              -Xshare:off       do not attempt to use shared class data
              -Xshare:auto      use shared class data if possible (default)
              -Xshare:on        require using shared class data, otherwise fail.   
             
              一目了然,以前只是看別人在應用,但不知道出處,看來看書不仔細呀
           
            3,設(shè)置路徑
               使用 -classpath 設(shè)置所需要的jar文件
               java -Dyourname="%JAVA_HOME%" -classpath ".;./yourjar.jar" yourclass
               開始忘記了那個.號,執(zhí)行時老是報類找不到。
           
            4,使用bat
               這么多參數(shù)需要設(shè)置,每次都要打一大堆,使用批處理文件就方便多了
               將上面那么長的一段話寫入批處理文件,直接執(zhí)行批處理文件。
               

          posted @ 2008-01-10 11:20 gfh21cn 閱讀(617) | 評論 (0)編輯 收藏
           
          學習,融通,構(gòu)建自己的知識體系 我的計算機編程是從C開始的,經(jīng)過C++,JAVA,C#,還學習過譬如pyton的一些腳本語言,這些經(jīng)歷對于我莫大的幫助,在了解我們要使用的工具后,方能做到知用,善用。當然我不是高手,我是一個旅行者,不斷學習方能充實自己。 建立BLOGJAVA的博客,是用于記錄我在JAVA方面的一些學習歷程,是和諸位高手溝通的一個平臺,分享是快樂的,共同進步才是真諦。
          posted @ 2007-12-27 09:31 gfh21cn 閱讀(166) | 評論 (0)編輯 收藏
           
          Copyright © gfh21cn Powered by: 博客園 模板提供:滬江博客
          主站蜘蛛池模板: 鹤庆县| 久治县| 师宗县| 建昌县| 天柱县| 海丰县| 金坛市| 平塘县| 赞皇县| 淄博市| 赤城县| 万盛区| 黔西| 嵩明县| 扎囊县| 辽源市| 兴安县| 神木县| 康乐县| 海淀区| 咸宁市| 牟定县| 共和县| 井陉县| 丰原市| 沈阳市| 铁岭县| 民丰县| 喀喇沁旗| 衡水市| 许昌县| 齐齐哈尔市| 石狮市| 灵寿县| 仙桃市| 繁峙县| 哈密市| 黎平县| 呼伦贝尔市| 札达县| 三江|