java - Access restriction on class due to restriction on required library rt.jar? -


i'm attempting compile java 1.4 code created ibm's wsdl2java on java5 without recreating stubs , saw error in eclipse. i'm under assumption stubs created should compile long runtime jars available (they are).

access restriction: type qname not accessible due restriction on required library c:\program files\java\jdk1.5.0_16\jre\lib\rt.jar

the full classname javax.xml.namespace.qname

what going on here?

is case trying refactor pig sausage? better off recreating stubs?

there's solution works. found on this forum:

  1. go build path settings in project properties.
  2. remove jre system library
  3. add back; select "add library" , select jre system library. default worked me.

this works because have multiple classes in different jar files. removing , re-adding jre lib make right classes first. if want fundamental solution make sure exclude jar files same classes.

for me have: javax.xml.soap.soappart in 3 different jars: axis-saaj-1.4.jar, saaj-api-1.3.jar , rt.jar


Comments

Popular posts from this blog

Java 8 + Maven Javadoc plugin: Error fetching URL -

css - SVG using textPath a symbol not rendering in Firefox -

order - Notification for user in user account opencart -