Discussions

General J2EE: Dirty Compilation

  1. Dirty Compilation (1 messages)

    Can java support Dirty Compilation(compiling only when the source has been modified) ?

    CASE #1
    Somewhere in Java compiler. (Present Implementation)

    if Main.class is not found
    compile Main.java
    end if

    exec main() from Main.class

    CASE #2
    If header for class file is modified to keep the timestamp of respective Java file. The following condition
    will be executed for all the class files referenced within Main.java.

    if Main.class is not found
    OR
    (Main.class is found
    AND TIMESTAMP in Main.class header != Last Modified Timestamp of Main.java)
    compile Main.java
    end if

    exec main() from Main.class

    Cheers,

    -Nitin

    Threaded Messages (1)

  2. Dirty Compilation[ Go to top ]

    You could implement your own ClassLoader to do that.