jars v. classes

S

soup_or_power

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.
 
A

Andrew Thompson

...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.
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top