Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Does Java require imported libraries to be present at runtime? 1

Status
Not open for further replies.

wolfie78uk

Programmer
Jul 3, 2002
35
GB
Hi,

I have been writing an Ant build script to build a large project, previously built with JDeveloper. However, I noticed that there was a descrepancy between the sizes of the Jar files produced by JDeveloper and those produced by Ant. The reason for this was that JDeveloper included all manner of libraries into each Jar file that it produced and I am unsure whether to include these libraries in the Ant build. Unfortunately, I don't have currently have access to the test bed to check whether the libraries ar required but I am hoping that I can check the theory of the JVM operation with you kind people while I wait for access to the test bed. :)

Imagine I have files a.class and b.class that both make use of classes contained in classes12.zip (an Oracle file).
I put them into c.jar to put on the live system.

Does classes12.zip need to be present on the live system or is it like C and everything needed from classes12.zip has been copied into the a.class and b.class bytecode during compilation?

Does classes12.zip need to be in c.jar? If so, do I need to unzip classes12.zip and then put the individual class files into c.jar (as JDeveloper appeared to)?

Is there another solution? If it is relevant, the system will be running on Apache Tomcat. Also, this question also applies to classes imported from jar files as well as zip files.

Thanks in advance.

Simon
 
Just put classes12.jar into TOMCAT_HOME/common/lib, and leave it there for eternity.

Note that if using tomcat 5, you will need to either use the Oracle supplied classes12.jar or renamed the .zip to .jar, because tomcat 5 will not load .zip files.

--------------------------------------------------
Free Database Connection Pooling Software
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top