Results 1 to 1 of 1
- 05-26-2010, 10:34 PM #1
Member
- Join Date
- May 2010
- Posts
- 2
- Rep Power
- 0
javac does not import package from jar in 1.6
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,
/xenv/java/X/1.6.0_18/jre/lib/rt.jar,
.
.
/xenv/java/X/1.6.0_18/jre/lib/ext/localedata.jar,
./DaoJar/platDao.jar,
/xenv/oracleclient/X/11.1.0.7_SOLARIS/jdbc/lib/ojdbc6.jar,
.
[search path for source files: ./DaoJar/platDao.jar,
/xenv/oracleclient/X/11.1.0.7_SOLARIS/jdbc/lib/ojdbc6.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.
Similar Threads
-
Import your own package
By Umi in forum New To JavaReplies: 4Last Post: 02-15-2010, 09:05 AM -
How to import a Java package?
By tyang in forum New To JavaReplies: 4Last Post: 02-06-2010, 09:14 PM -
Help Needed to import package
By gradStudent in forum New To JavaReplies: 10Last Post: 08-11-2009, 01:37 AM -
How to import a package before it is compiled
By gradStudent in forum Advanced JavaReplies: 1Last Post: 08-11-2009, 12:17 AM -
How to import a package in Eclipse?
By naipulb in forum New To JavaReplies: 2Last Post: 06-09-2008, 11:04 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks