[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.newcomer] Eclipse uses libs outdide of build path

Dear all,
I have a Java project in my eclipse 3.3.2. In my build path libraries, I have only two libs:


- wre.jar : this is the JRE I want to use. It does not contain the XML APIs
- xml-apis.jar : the XML APIs from apache xml-commons

In particular I have _no_ system JRE (eg. from Sun) in the build path.

If I run the following code:

import org.w3c.dom.Text;
public class TextTest {
  public static void main(String[] args) {
    System.out.println(Text.class.getResource("Text.class"));
  }
}

it prints out
jar:file:/C:/Program%20Files/Java/jdk1.6.0_02/jre/lib/rt.jar!/org/w3c/dom/Text.class

Why does it not get the org.w3c.dom.Text from the xml-apis.jar which is in the build path, but rather from the default JRE which is installed on the system?

What settings should I change, so that the classes aree taken from the jars in the build path?

Thanks for your answers.
Phil