Source files in JAR file are sometimes compiled

Discussion in 'Java' started by jd, Oct 8, 2003.

  1. jd

    jd Guest

    We are building a jar file which includes sources (.java) files
    for use with tools such as JBuilder that can use the source
    code for autocompletion etc.

    On most of our machines, we can use this jar file when building
    Java applications with no problems.

    On one machine, if we build the jar file and then add it to the
    classpath when building another application, the java compiler
    (1.4.1) tries to compile the java files in the jar (and fails).
    If we rebuild the jar and then recompile the application, things
    work fine.

    I've done a binary diff on the two jars and (as expected) only
    the timestamps differ. Yet the java compiler consistently shows
    this behavior. I've copied the two jar files to my machine and
    I can reproduce the problem (however, when I build the jar on my
    machine, I don't have any problems).

    I'm at a loss to explain this behavior. I can fix the problem
    by either rebuilding the jar or removing the source files from
    the jar, but I'd like to understand the real problem here.


    -- jeff
    jd, Oct 8, 2003
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.