• Post Reply Bookmark Topic Watch Topic
  • New Topic

How does my program see a Class in a JAR when the JAR is not in the CLASSPATH?  RSS feed

 
Arie Morgenstern
Greenhorn
Posts: 12
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using JDeveloper, I created a Web Service Proxy project to consume a WSDL. Doing so downloaded/created a bunch of Java classes.
After some finishing touches, I ran it inside JDeveloper and it works.

Some of the code uses a class called SecurityPolicyFeature. And for learning purposes, I am curious how it "sees" that class.
I added:

It told me where the JAR is:


The thing I don't understand is, how does it "see" ws.api_1.1.0.0.jar?
Its not in my Windows environment variable classpath.
When the project was setup (through a JDeveloper Wizard for Web Proxies) it apparently loaded some JAR files as libraries. But, ws.api_1.1.0.0.jar is not one of them.
Some of the JAR files that are attached as libraries have a file like: META-INF/MANIFEST.MF
I gather that MANIFEST.MF can have CLASSPATH variables pointing to other JAR files?

How can I tell if one of these MANIFEST.MF files points to the ws.api_1.1.0.0.jar? Or worse, a MANIFEST.MF points to a JAR with a MANIFEST.MF, which points to a JAR with a MANIFEST.MF, etc, etc, until finally it points to ws.api_1.1.0.0.jar?
How does one untangle the web?

Thanks,
Arie
 
Stephan van Hulst
Saloon Keeper
Posts: 7993
143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could take a look at this page: http://www.kirkk.com/main/Main/JarAnalyzer
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its not in my Windows environment variable classpath.


Generally speaking, servlet containers such as Tomcat do not use the environment variable classpath.

See typical class loader howto docs.

Bill
 
Dave Tolls
Ranch Foreman
Posts: 3068
37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
William Brogden wrote:
Generally speaking, servlet containers such as Tomcat do not use the environment variable classpath.


I would argue that no Java app should be using the CLASSPATH environment variable.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!