<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    2006年10月31日

    http://www.csit.fsu.edu/~burkardt/data/data.html
    可以從中找到大部分文件格式的相關(guān)信息。例如BMP,Obj等等。

    http://www.csit.fsu.edu/~burkardt/data/obj/obj.html
    介紹OBJ文件格式,關(guān)鍵是當(dāng)中提供了讀寫和轉(zhuǎn)換OBJ文件的工具建議。

    posted @ 2006-10-31 00:11 cjren 閱讀(274) | 評論 (0)編輯 收藏

    2006年7月23日

    ?helloWorldEg.jpg
    就一幅圖,仔細(xì)看看和聯(lián)想一下,也許會有點得益:-)

    posted @ 2006-07-23 20:14 cjren 閱讀(268) | 評論 (0)編輯 收藏
     
    What do you know The Life Cycle of a Thread?
    threads-states.gif
    Can you say something about the life cycle of a thread, it's creating, starting, running, not runnale, and stopping? If you do want to know about more, please check it out: http://java.sun.com/docs/books/tutorial/essential/threads/lifecycle.html
    posted @ 2006-07-23 20:10 cjren 閱讀(323) | 評論 (0)編輯 收藏
     

    (1)
    The Art of Programming Language
    《計算機程序設(shè)計藝術(shù)》 清華大學(xué)出版社

    (2)
    Introduction to Algorithms, Second Edition
    Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest and Clifford Stein
    MIT
    《算法導(dǎo)論,影印版》高等教育出版社

    (3)
    Intruduction to The Design and Analysis of Algorithms
    (US)Anany Levitin
    算法設(shè)計與分析基礎(chǔ)
    潘彥 譯?
    清華大學(xué)出版社

    其實第一本我沒有看過,只是提及算法方面的書籍,這一本好像都應(yīng)該為人所知道似的。第二本的課程資料可以在mit的open course ware頁面下載。第三本的譯本很不錯,感覺很有點幽默有趣,而且書的結(jié)構(gòu)挺新穎,不至于讓人馬上對算法這東西覺得恐怖和煩悶。推薦第三本。

    posted @ 2006-07-23 19:38 cjren 閱讀(739) | 評論 (0)編輯 收藏
     

    移動 -- 只有GSM,GPRS是GSM的升級版,134-139 手機使用移動的SIM卡???????

    聯(lián)通 -- GSM? 130,131,132?????? 手機使用聯(lián)通SIM卡
    ?????????-- CDMA 133 (聯(lián)通新時空),手機使用UIM卡


    GSM比較簡單。所謂的GSM 900/1800/1900是指GSM手機的工作頻率,分別是中國移動支持的900MHz,1900MHz和美國常用的1900MHz。在國內(nèi)用支持900MHz和1800MHz的GSM 900/1800雙頻手機就可以了。如果要出國到美國用的,就要用支持1900MHz的三頻手機了。

    CDMA比GSM的通話質(zhì)量、手機輻射小和保密性方面都好,但是技術(shù)!=市場。
    CDMA -- CDMA800
    ?????????? ?-- CDMA 1X 現(xiàn)在聯(lián)通CDMA網(wǎng)絡(luò)所采取的技術(shù)。與真正的CDMA2000相比,CDMA 1x就像我剛才說的,只能支持到153.6kbps的數(shù)據(jù)速度,因此被稱為是2.5G的技術(shù),還不是真正3G的技術(shù)。
    ????????? ? -- CDMA2000 一種3G的標(biāo)準(zhǔn)。


    3G 有三個標(biāo)準(zhǔn)
    ??????????? -- WCDMA 有利于中國移動,設(shè)備由歐洲進(jìn)口,容易升級到WCDMA。這套系統(tǒng)能夠架設(shè)在現(xiàn)有的GSM網(wǎng)絡(luò)上,對于系統(tǒng)提供商而言可以較輕易地過渡,而GSM系統(tǒng)相當(dāng)普及的亞洲對這套新技術(shù)的接受度預(yù)料會相當(dāng)高。因此W-CDMA具有先天的市場優(yōu)勢。
    ?
    ???????????? -- CDMA2000 利于聯(lián)通,設(shè)備由美國進(jìn)口,容易升級到CDMA2000。目前使用CDMA的地區(qū)只有日、韓和北美,所以CDMA2000的支持者不如W-CDMA多。不過CDMA2000的研發(fā)技術(shù)卻是目前各標(biāo)準(zhǔn)中進(jìn)度最快的,許多3G手機已經(jīng)率先面世。

    ???????????? -- TD-SCDMA 中國自己有獨立知識產(chǎn)權(quán)的產(chǎn)品。采用這一標(biāo)準(zhǔn),對于國防等重要領(lǐng)域國民經(jīng)濟安全有利。據(jù)說中國電信和中國網(wǎng)通都在申請移動運營牌照,他們傾向于TDS-CDMA。
    ?????? 至于現(xiàn)在中國采用哪一種現(xiàn)在還沒有定論。畢竟需要市場和企業(yè)來最終決定,記住技術(shù)優(yōu)秀的并不代表最終就能勝出。

    posted @ 2006-07-23 19:28 cjren 閱讀(550) | 評論 (0)編輯 收藏

    2006年7月8日

    "Computer science is no more about computers than astronomy is about telescopes."

    ????????????????????????????????????????????????? E. W. Dijkstra
    計算機是一個工具,一個人造的工具,人制造工具的目的是什么?協(xié)助自己完成生產(chǎn)勞動,或確切地說是完成自己生存和生活的需要。由于需要完成大量的運算而產(chǎn)生的計算機,即使是到現(xiàn)在也局限于信息的處理,包括簡單的運算和信息(數(shù)字)的存儲。

    而在學(xué)習(xí)當(dāng)中,“sprint,struct”等這些名字聽起來真的很大,而我常問自己“我需要學(xué)習(xí)它嗎?”。是否不懂它們就不算懂java了呢?我從4月份開始覺得java離自己越來越遠(yuǎn)了,因為我上許多的關(guān)于java的論壇,看到的極大部分都是討論框架,而我對此沒有什么概念。“需求驅(qū)動學(xué)習(xí)”是我的信條,沒有這個需求,你就沒有學(xué)習(xí)那相應(yīng)知識的必要,更沒有動力。也許這是我懶的借口:-) 大概是自己尚且是學(xué)生,沒有投身都企業(yè)生產(chǎn)當(dāng)中因此對這些企業(yè)開發(fā)的知識沒有概念吧。反正覺得現(xiàn)在沒有學(xué)這個的必要,誰知道兩年后是否有什么summer or XXname的框架出現(xiàn)呢?

    這個暑假其實自己還是想把握時間看看書的,反正又沒有找到實習(xí)工作。例如data structure & algorithm,算法分析這門課沒有學(xué)過,真的遺憾,只能自己補補;還有那Developing Games in Java的part 3,當(dāng)中講的是3d的renderring,而不涉及opengl以及java3d或opengl binding等API,自己還是很有興趣的。而昨天在國外的大學(xué)的網(wǎng)站上下載了一個OS課程的lecture notes,正好復(fù)習(xí)一下操作系統(tǒng)的概念。

    posted @ 2006-07-08 10:25 cjren 閱讀(650) | 評論 (1)編輯 收藏

    2006年7月7日

         摘要: 2006-7-7 CP2003 -- Principles of Programming Languages 1997 This course (subject) comes frome http://www.cs.jcu.edu.au/Subjects/cp2003/1997/lecturenotes.html, and you can fin...  閱讀全文
    posted @ 2006-07-07 10:49 cjren 閱讀(615) | 評論 (0)編輯 收藏

    2006年7月6日

    上午看某文章時候涉及緩沖區(qū)溢出的問題,談到C的棧和堆,有所不懂于是baidu了一下發(fā)現(xiàn)論壇上的解釋都較為凌亂,google一下后發(fā)現(xiàn)國外大學(xué)的Lecture Notes 中有不少的說明,下面簡單的摘錄三段,一是c中的,二是對于java的,三是從os角度看的。

    Stack vs Heap Allocation
    How the memory of the computer is organized for a running program? When a program is loaded into memory, it is organized into three areas of memory, called segments: the text segment, stack segment, and heap segment. The text segment (sometimes also called the code segment) is where the compiled code of the program itself resides. This is the machine language representation of the program steps to be carried out, including all functions making up the program, both user defined and system.

    The remaining two areas of system memory is where storage may be allocated by the compiler for data storage. The stack is where memory is allocated for automatic variables within functions. A stack is a Last In First Out (LIFO) storage device where new storage is allocated and deallocated at only one ``end'', called the Top of the stack. This can be seen in Figure 14.13.?
    ?figure14.13.gif

    When a program begins executing in the function main(), space is allocated on the stack for all variables declared within main(), as seen in Figure 14.13(a). If main() calls a function, func1(), additional storage is allocated for the variables in func1() at the top of the stack as shown in Figure 14.13(b). Notice that the parameters passed by main() to func1() are also stored on the stack. If func1() were to call any additional functions, storage would be allocated at the new Top of stack as seen in the figure. When func1() returns, storage for its local variables is deallocated, and the Top of the stack returns to to position shown in Figure 14.13(c). If main() were to call another function, storage would be allocated for that function at the Top shown in the figure. As can be seen, the memory allocated in the stack area is used and reused during program execution. It should be clear that memory allocated in this area will contain garbage values left over from previous usage.

    The heap segment provides more stable storage of data for a program; memory allocated in the heap remains in existence for the duration of a program. Therefore, global variables (storage class external), and static variables are allocated on the heap. The memory allocated in the heap area, if initialized to zero at program start, remains zero until the program makes use of it. Thus, the heap area need not contain garbage.
    小結(jié):
    Stack: automatic variables within functions
    Heap: global variables (storage class external), and static variables
    ============================
    In java 情況如下
    (1)
    ?The stack is the program memory area, so all your primitive type variables and the memory adress of your objects are written on the stack. It is a fast access valuable memory area.
    The heap is where the VM keeps the objects, and it is a huge amount of memory. When you create an object, the VM puts the object in the HEAP and puts the adress of the object created on the STACK.
    (2)
    ?There are two kinds of memory used in Java. These are called stack memory and heap memory. Stack memory stores primitive types and the addresses of objects. The object values are stored in heap memory. An object reference on the stack is only an address that refers to the place in heap memory where that object is kept.
    ?It is useful to know that these two different kinds of memory exist in Java. Stack memory is the program's memory, and heap memory resides outside of the program.這好像有點跟C的不同(相反)。
    引入一點垃圾回收機制的知識
    ?When you need a new object, Java allocates the required memory. When you are done with an object, the memory is reclaimed for you automatically via Java's garbage collection facility.
    ?Garbage collection runs as a thread in the background, looking for objects that no longer have a usable reference. When it finds them, it destroys them and reclaims the memory.
    ?The implementation of garbage collection varies between Java Virtual Machines. They generally follow the same process, however. First, the garbage collector gets a snapshot of all running threads and all loaded classes. Then, all objects that are referred to by this thread set are marked as current. The process stops when all objects that it is possible to reach have been marked and the rest have been discarded.
    ?In order to help the Virtual Machine, it is a good idea to remove your references to unneeded objects. This is often done by simply setting your reference to null:
    ?Test t = new Test();
    ?t.someAction();
    ?// all done
    ?t = null;
    小結(jié):
    Stack: Primitive data types(primitive types), the addresses of objects(=references).
    Heap:? objects.

    ===============================================
    從系統(tǒng)的角度看 stack(棧)和heap(堆)
    Dynamic Data Structures: The Heap
    A typical personal computer or workstation today has somewhere between 16 and 64 megabytes of RAM installed. Using a technique called virtual memory, the system can swap pieces of memory on and off the machine's hard disk to create an illusion for the CPU that it has much more memory, for example 200 to 500 megabytes. While this illusion is complete as far as the CPU is concerned, it can sometimes slow things down tremendously from the user's perspective. Despite this drawback, virtual memory is an extremely useful technique for "increasing" the amount of RAM in a machine in an inexpensive way. Let's assume for the sake of this discussion that a typical computer has a total memory space of, for example, 50 megabytes (regardless of whether that memory is implemented in real RAM or in virtual memory).
    The operating system on the machine is in charge of the 50-megabyte memory space. The operating system uses the space in several different ways, as shown here:

    ?c-heap.gif
    The operating system and several applications, along with their global variables and stack spaces, all consume portions of memory. When a program completes execution, it releases its memory for reuse by other programs. Note that part of the memory space remains unused at any given time.

    This is, of course, an idealization, but the basic principles are correct. As you can see, memory holds the executable code for the different applications currently running on the machine, along with the executable code for the operating system itself. Each application has certain global variables associated with it. These variables also consume memory. Finally, each application uses an area of memory called the stack, which holds all local variables and parameters used by any function. The stack also remembers the order in which functions are called so that function returns occur correctly. Each time a function is called, its local variables and parameters are "pushed onto" the stack. When the function returns, these locals and parameters are "popped." Because of this, the size of a program's stack fluctuates constantly as the program is running, but it has some maximum size.

    As a program finishes execution, the operating system unloads it, its globals and its stack space from memory. A new program can make use of that space at a later time. In this way, the memory in a computer system is constantly "recycled" and reused by programs as they execute and complete.

    In general, perhaps 50 percent of the computer's total memory space might be unused at any given moment. The operating system owns and manages the unused memory, and it is collectively known as the heap. The heap is extremely important because it is available for use by applications during execution using the C functions malloc (memory allocate) and free. The heap allows programs to allocate memory exactly when they need it during the execution of a program, rather than pre-allocating it with a specifically-sized array declaration.

    posted @ 2006-07-06 17:30 cjren 閱讀(4431) | 評論 (3)編輯 收藏
     


    在嘗試建立自己的可重用package的時候,對package和import語句做了些試驗,記錄結(jié)果如下。

    使用說明:
    (1)對于src\com\cjren\util\ClassA.java這個提供給其他類使用的class.
    package com.cjren.util;
    public class ClassA {
    ? ...
    }
    編譯時:
    javac -d . ClassA.java? // -d . 表示了以當(dāng)前目錄為package語句生成的相對根目錄。
    結(jié)果是在ClassA.java所在的目錄下生成了com.cjren.util包,里面含ClassA.class,這個包可以復(fù)制剪貼到其他的地方供其他類使用。
    Notes:
    必須使用"-d .",否則ClassA.class并不會放在com.cjren.util包里面,而是生成在和ClassA.java相同的目錄下。


    (2)對于要使用ClassA的ClassB.java.
    import com.cjren.util.ClassA;
    public class ClassB {
    ? ... // use ClassA here
    }

    To compile: javac ClassB.java
    To run:???? 假設(shè)com包放在和ClassB.java的當(dāng)前目錄
    ??????????? java ClassB???????
    ??????????? // or java -cp . ClassB // here use the "-cp ." as the current directory to find the package com.
    ??????????? 假設(shè)com包放在D:\Program Files\Java\mypackages下
    ??????????? java -cp D:\Program Files\Java\mypackages ClassB

    Notes:
    錯誤一:
    package com.cjren.util;
    public class ClassA {
    ? ...
    }
    編譯后直接把com.cjren.util包里面的ClassA.class文件拷貝到和ClassB.java相同的目錄下直接使用,
    public class ClassB {
    ? ... // use ClassA here
    }
    To compile: javac ClassB.java
    錯誤信息是
    "ClassB.java:某一行: 無法訪問 ClassA
    ?錯誤的類文件: .\ClassA.class
    ?類文件包含錯誤的類: com.cjren.util.ClassA
    ?請刪除該文件或確保該文件位于正確的類路徑子目錄中。"
    想一想為什么出錯信息是說:“錯誤的類文件: .\ClassA.class, 類文件包含錯誤的類: com.cjren.util.ClassA”呢?因為"錯誤的類文件: .\ClassA.class"當(dāng)中包含了"錯誤的類: com.cjren.util.ClassA"這個信息,而這個"com.cjren.util.ClassA"是在ClassA.java中的"package com.cjren.util;"語句所造成的。
    正確的做法是把ClassA.class所在的包整個復(fù)制粘貼到ClassB.java所在的目錄下,或者在ClassB.java所在的目錄下人為手動的建立com\cjren\util\目錄,然后直接把ClassA.class文件復(fù)制粘貼到此。這暗示了代碼生成的包和手動建立的目錄可能是一樣。
    可見,當(dāng)ClassA.java的源代碼中含"package com.cjren.util;"語句,則生成com.cjren.util包里面的ClassA.class文件里面應(yīng)該就也包含了自己這個class文件所屬的包信息,所以這個ClassA.class只能放在這個代碼中已經(jīng)指定的特定包的路徑下使用,而不能把這個ClassA.class獨立出來使用,因為這樣的話將ClassA.class文件屬性中的的包信息不相符。當(dāng)然當(dāng)這個ClassA.java沒有顯式地制定package語句信息時候,我懷疑(也覺得應(yīng)該)是默認(rèn)在ClassA.class文件當(dāng)中包含了包的信息就是".",可以理解為默認(rèn)的加入了"package .;"語句。

    錯誤二:
    public class ClassA {
    ? ...
    }
    編譯后這個ClassA.class文件中含有的包的信息是"."當(dāng)前目錄就包!
    把這個ClassA.class文件,移到以ClassB.java所在的目錄為當(dāng)前父目錄的人為手動建立的com\cjren\util目錄下。
    import com.cjren.util.ClassA;
    public class ClassB {
    ? ... // use ClassA here
    }

    To compile: javac ClassB.java
    錯誤信息是
    "ClassB.java:某一行: 無法訪問 com.cjren.swing.ClassA
    ?錯誤的類文件: .\com\cjren\util\ClassA.class
    ?類文件包含錯誤的類: ClassA
    ?請刪除該文件或確保該文件位于正確的類路徑子目錄中。"
    想一想為什么出錯信息是說:“錯誤的類文件: .\com\cjren\util\ClassA.class,類文件包含錯誤的類: ClassA”呢?因為你這個com.cjren.util包中的ClassA.class文件本來所默認(rèn)的包信息是".",在ClassA.java中并沒有使用"package"語句指定ClassA應(yīng)該屬于包com\cjren\util這個信息。

    小結(jié):
    在嘗試過程當(dāng)中發(fā)現(xiàn),
    public class ClassA {
    ? ...
    }

    package com.cjren.util;
    public class ClassA {
    ? ...
    }
    這兩個只差了一個package語句的class文件大小有十幾到幾十k上的區(qū)別,這可能進(jìn)一步證明了.java文件中的package語句會在.class文件中加入相應(yīng)的包信息,這個包信息決定了這個class被使用時候的方式(是否需要import特定的包)。
    還有一點要注意的是:
    package com.cjren.util;
    public class ClassA {
    ? ...
    }
    之后無論是使用 javac ClassA.java 或者 javac -d . ClassA.java編譯都不會影響ClassA.class文件當(dāng)中所含有的包信息,這兩種編譯方式所造成的區(qū)別在上面的使用說明中已經(jīng)說過了。


    ?

    posted @ 2006-07-06 09:00 cjren 閱讀(825) | 評論 (3)編輯 收藏

    2006年6月26日

    2006-6-24

    嘗試以一個例子來說明搭建一個 project 時候的目錄構(gòu)建情況。

    ?

    情況一

    下面以一個地圖編輯器的例子為例

    project mapeditor

    父目錄是
    ”project mapeditor”,

    .\Image 程序使用到的圖片。

    .\Maps 程序運行時用戶保存的自定義地圖。

    .\com 主程序 MapEditor.java 將會是用到的 package 的源文件。

    .\com\cjren\swing\MyFilter.java

    MapEditor.java 主程序源文件,代碼中沒有 ”package” 語句。

    runMapEditor.bat 完成編譯和運行所需的所有工作。

    ?

    下面主要看看 runMapEditor.bat 的內(nèi)容:

    @echo off

    rem output the date and time

    date /T

    time /T

    echo welcome to my map editor :-)

    ?

    rem make the directory for class files

    mkdir .\build\classes

    ?

    rem compile the source files

    javac -d .\build\classes MapEditor.java

    ?

    rem run the application,

    rem but you must avoid this: java.\build\classes\MapEditor,

    rem which will be an error

    java -cp .\build\classes MapEditor

    ?

    rem clean everything in the build folder

    rmdir .\build /S /Q

    ?

    pause

    ?

    從上面的具體代碼中可以看出在編譯和運行的時候,所有的 class 文件都回被放在 .\build\classes 這個文件夾中,這個文件夾是動態(tài)生成并且最后會被清楚掉的。

    ?

    這里有三個值得注意的地方。

    一,通過 ” javac -d .\build\classes MapEditor.java” ,不單只是 MapEditor.java 所定義的 class 都被放于 .\build\classes 中,甚至連 .\com MyFilter.java 所對應(yīng)的 class 也都在 .\build\classes\com\cjren\swing 中,而 com 包在 .\bulid\classes 下是自動被準(zhǔn)確生成的。也就是說所有的 .class 文件都被放在 .\bulid\classes 文件夾中了。

    二,當(dāng)使用 ”java -cp .\build\classes MapEditor” 來運行程序的時候,并沒有因為 Image 文件夾不在 .\build\classes 而出錯。這說明了 .java 文件中的代碼已經(jīng)決定了它所使用到的 Image 文件夾的位置,這個位置是相對于 .java 文件所在的位置來說的,而不是 .class

    三,我嘗試了在 d 盤下新建了一個 a 目錄,然后把

    javac -d .\build\classes MapEditor.java

    java -cp .\build\classes MapEditor

    換成

    javac -d d:\a MapEditor.java

    java -cp d:\a MapEditor

    之后,其他 ”project mapeditor” 下的所有東西都沒有改變,程序依然成功執(zhí)行。這就進(jìn)一步證明了 .java 文件中的代碼決定了所有其他目錄或文件元素的相對位置,這個位置以 .java 文件所在的目錄為標(biāo)準(zhǔn)。而與 .class 文件的路徑無關(guān)。但是:別混淆了 A.class 它所使用到的包的 .class 的路徑是以 A.class 文件的路徑為標(biāo)準(zhǔn)的!!!這就與上面 MapEditor.class 也和(必須和) com 包同處于 bulid\classes 目錄下沒有矛盾。

    ?

    情況二

    目的是把上面情況一中所有的文件和文件夾都包含在 src 這個文件夾中,而 src 本身就是父目錄 project mapeditor2 下的一個文件夾。而且我希望編譯時候生成的 build 文件夾和 src 文件夾的關(guān)系是:

    \project mapeditor2\src

    \project mapeditor2\build



    src
    文件夾的內(nèi)容如下:

    pj2-src
    注意批處理文件
    runMapEditor.bat src 文件夾下,而且在此情況下, runMapEditor.bat 的內(nèi)容將有所變化:

    @echo off

    rem output the date and time

    date /T

    time /T

    echo welcome to my map editor :-)

    ?

    rem make the directory for class files

    mkdir ..\build\classes

    ?

    rem compile the source files

    javac -d ..\build\classes MapEditor.java

    ?

    rem run the application,

    rem but you must avoid this: java.\build\classes\MapEditor,

    rem which will be an error

    java -cp ..\build\classes MapEditor

    ?

    rem clean everything in the build folder

    rmdir ..\build /S /Q

    ?

    pause

    ?

    情況一和情況二的差別不大,只是源代碼文件多一層的文件夾的包裹。而且最大的共同點是 runMapEditor.bat 和源代碼文件在同一個文件夾下。

    ?

    情況三

    嘗試在情況二的基礎(chǔ)上把 runMapEditor.bat 提到和 src 以及 build 相同的父目錄下。假設(shè)父目錄是 project mapeditor3 ,則:

    pj3
    現(xiàn)在
    runMapEditor.bat 的內(nèi)容是:

    @echo off

    rem output the date and time

    date /T

    time /T

    echo welcome to my map editor :-)

    ?

    rem make the directory for class files

    mkdir .\build\classes

    ?

    rem go into the src directory

    cd src

    ?

    rem compile the source files

    javac -d ..\build\classes MapEditor.java

    ?

    rem run the application,

    rem but you must avoid this: java.\build\classes\MapEditor,

    rem which will be an error

    java -cp ..\build\classes MapEditor

    ?

    rem clean everything in the build folder

    rmdir ..\build /S /Q

    ?

    pause

    ?

    在嘗試工程當(dāng)中,發(fā)現(xiàn)以下的做法將找不到 Image 文件夾:

    cd src

    javac -d ..\build\classes MapEditor.java

    cd ..

    java -cp .\build\classes MapEditor

    這種修改所造成的區(qū)別是運行 ”java” 命令的位置不同了。可以猜想是需要在 src 文件夾內(nèi)運行 java 命令,而 src 文件夾中含有所有程序所需的代碼和 image 素材。

    ?

    下面提供一個稍微不同的批處理文件, runMapEditor2.bat ,它也同樣處于 project mapeditor3 這個父目錄下:

    pj3-

    runMapEditor2.bat
    的內(nèi)容如下:

    @echo off

    mkdir d:\a

    cd src

    javac -d d:\a MapEditor.java

    java -cp d:\a MapEditor

    rmdir d:\a /S /Q

    pause

    這個修改過的例子把 class 文件都移到較遠(yuǎn)的地方 (d:\a) ,但是還可以成功運行。小結(jié)一下它能成功運行的特點:

    一, src 文件夾中已經(jīng)包含了所有的元素,包括所需的外部 package 代碼,包括 image 文件夾。這些元素都必須使得主程序 .java 能成功的編譯。

    二,運行 ”java” 命令都在 src 這個目錄下。也就是說都在和代碼處在相同的文件路徑下,而不是其他任何路徑。

    ?

    情況一都三的小結(jié)

    基本滿足了在 windows 系統(tǒng)下開發(fā)小項目的需求,我在這三個嘗試的例子中主程序 MapEditor.java 都沒有含有 ”package main” 這類的打包語句。

    posted @ 2006-06-26 01:35 cjren 閱讀(403) | 評論 (0)編輯 收藏
    僅列出標(biāo)題  下一頁
     
    主站蜘蛛池模板: 久久久久国产精品免费网站| 久久国产乱子免费精品| 亚洲国产专区一区| 好吊色永久免费视频大全| 久久亚洲免费视频| 免费电影在线观看网站| 无码天堂va亚洲va在线va| 精品国产人成亚洲区| 久久久免费的精品| 亚洲综合一区二区三区四区五区| 国产精品国产自线拍免费软件| 看一级毛片免费观看视频| 亚洲VA中文字幕无码一二三区 | 中文字幕无码免费久久99| 亚洲AV无码成人精品区日韩 | 一边摸一边桶一边脱免费视频 | 亚洲第一网站男人都懂| 最近中文字幕国语免费完整| 午夜不卡AV免费| 亚洲偷偷自拍高清| 亚洲AV无码精品色午夜果冻不卡| 国产极品美女高潮抽搐免费网站| 8888四色奇米在线观看免费看| 免费无码专区毛片高潮喷水| 亚洲一区在线视频| 亚洲av无码乱码国产精品fc2| 国产jizzjizz免费看jizz| 国产曰批免费视频播放免费s| a级成人免费毛片完整版| 国产亚洲精品AAAA片APP| 亚洲不卡中文字幕| 亚洲国语精品自产拍在线观看| 亚洲国产精品自产在线播放| 午夜免费福利在线| 美女网站免费福利视频| 鲁大师在线影院免费观看| a级毛片在线免费观看| 国产成人高清精品免费观看| 牛牛在线精品观看免费正| 亚洲av永久无码一区二区三区| 亚洲最新在线视频|