Hi All
I have a development environment where several jars are located say in
a directory /home/user/jars.
The java source is located say at /home/user/src. As I compile the
sources with -d option, they are placed under /home/user/jars. The
classpath contains all the jars. I am finding that when I run the code,
it is picking up stuff from jars ignoring the class files. IS there a
simple solution to fix this problem. IOW, how can I tell javac to first
look at class files and then jars. I don't enough about this
development environment dependencies to create an ant script. Your help
is appreciated.
/home/user/src ------------java files (e.g. myjara.java)
/home/user/jars -----------jars and class files
cd /home/user/src
javac -d ../jars myjava.java
Thanks for your help.
Roedy Green - 10 Nov 2005 14:37 GMT
>I am finding that when I run the code,
>it is picking up stuff from jars ignoring the class files.
That is the way it is supposed to work. The solution is to put all
your classes in jars and to use a jar class-path.
See http://mindprod.com/jgloss/jarexe.html
http://mindprod.com/jgloss/jar.html

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
Andrew Thompson - 10 Nov 2005 22:28 GMT
> ...The
> classpath contains all the jars.
Sun has been recommending against 'dumping every jar on
the classpath' for some time. Because..
>...I am finding that when I run the code,
> it is picking up stuff from jars ignoring the class files.
..mostly of that, and other associated hassles.
Add Jar's and/or classes to the run of each java project
selectively, and the problem is solved.