How do you discover this chain of dependencies and the list of classes you need to include in your jar?
rem capturing Javac verbose output rem to get a rough idea of the dependencies javac.exe -verbose *.java 2>temp.txt rem -30-to see what classes Javac compiled or looked at. It will cover the classes being compiled and classes your classes reference, but the listing won’t go futher to look at which classe those classes need. The compiler does not need to to be so recursive just to generate code.
These are the classes you will need to include in your jar. Erase all class files in the universe again and repeat compiling some other package to get its list of dependencies. So long as you have a good idea of what packages you use, this is pretty quick. You can even do a dir *.class to get a list of classes you can paste into your forjar.list file. This sort of works because javac will compile source is other packages if it cannot find a class file. If it can find a class file, no matter how out of date, it will use that without recompiling it. It might find one in a jar on the classpath, in the same directory as the source, or any other place accessible via the classpath.
This page is posted |
http://mindprod.com/jgloss/dependencies.html | |
Optional Replicator mirror
|
J:\mindprod\jgloss\dependencies.html | |
Please read the feedback from other visitors,
or send your own feedback about the site. Contact Roedy. Please feel free to link to this page without explicit permission. | ||
Canadian
Mind
Products
IP:[65.110.21.43] Your face IP:[44.220.251.236] |
| |
Feedback |
You are visitor number | |