I have a working build in jdk 1.5 on Solaris 10 that correctly imports package class files from a jar while 1.6 incorrectly re-compiles from the source code.

The jar in question is ./DaoJar/platDao.jar and the compiler keeps rebuilding from the source instead of loading the package from the jar.

javac -Xstdout ./bal.log -Xprefer:newer -verbose -deprecation -classpath $(CLASSPATH) -d $(OUTPUT_DIR)

Here are some relevant excerpts from the log.

[search path for class files: /xenv/java/X/1.6.0_18/jre/lib/resources.jar,
[search path for source files: ./DaoJar/platDao.jar,
[loading ./plat/dao/EntitlementDAO.java]

compiler loads source instead of class while class is newer.
jar tvf ./DaoJar/platDao.jar |grep EntitlementDAO
1340 Wed May 26 14:03:48 EDT 2010 plat/dao/EntitlementDAO.class

ls -ltr ./plat/dao/EntitlementDAO.java
1395 May 26 14:02 ./plat/dao/EntitlementDAO.java

If I remove the source directory, the resulting error is package not found.

The compile dependencies work correctly with jdk 1.5 and the classes are loaded from the jar.

Thanks in advance.