Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » JDT is not picking up indirectly referenced classes at build time?
JDT is not picking up indirectly referenced classes at build time? [message #198131] Wed, 09 March 2005 15:54
Eclipse UserFriend
Hi,

Here's my scenario... I have two plug-ins: org.apache.axis and org.uddi4j.

org.apache.axis has no code in it, it's a place holder for a few jar files:

<runtime>
<library name="lib/axis.jar">
<export name="*"/>
</library>
<library name="lib/axis-ant.jar">
<export name="*"/>
</library>
<library name="lib/jaxrpc.jar">
</library>
</runtime>

jaxrpc.jar contains a class call javax.xml.rpc.Call. However, this class is
not exposed to other plugins because I do not want to set <export name="*"/>
for this jar.
axis.jar contains a class call org.apache.axis.client.Call, which implements
the javax.xml.rpc.Call interface.

Now in the org.uddi4j plug-in, the following code does not compile:

org.apache.axis.client.Service service = new
org.apache.axis.client.Service();
call = (org.apache.axis.client.Call) service.createCall();

There are two error messages:

1. The project was not built since its build path is incomplete. Cannot find
the class file for javax.xml.rpc.Call. Fix the build path then try building
this project
2. The type javax.xml.rpc.Call cannot be resolved. It is indirectly
referenced from required .class files

Initially, I thought the reason why I got compile errors is because the
signature of service.createCall() returns javax.xml.rpc.Call. However, I
tried to add <export name="*"/> to jaxrpc.jar, but that didn't work. I have
to explicitly add jaxrpc.jar to the plug-in's Java build path in order to
get things compile (right click on plug-in -> properties -> Java Build
Path -> Libraries -> Add JARs...). My questions is why do I need to do that?
AFAIK, the Java Build Path is used during build time and is never used
during run time. And the above code works at run time (I did not have to
modify anything and I did not have to "expose" jaxrpc.jar or add it the
org.uddi4j plug-in). So why is the compiler flagging this as an error at
build time? Is this a bug? Any help would be appreciated.

Thanks,

Jeff
Previous Topic:Question from EclipseCon on Java Project dependancies
Next Topic:odd problem over RemoteDesktop
Goto Forum:
  


Current Time: Sun May 11 08:26:38 EDT 2025

Powered by FUDForum. Page generated in 0.02933 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top