Class Loader
Pojo Application Server

For some people this will feel like seriously advanced stuff, and using it is not a major necessity, others will be glad its there.

The reason for this is that what will happen over time, is that you will end up with super cool software sitting in your Harbor Repository, and yes using it remotely is no problem, but sometimes you going to be developing something on the same machine, and remember that you got all this ultra cool stuff sitting in there, and will want to use a class or ten.

You going to IMPORT com.yourthing.in.repository.*;

and then to your horror realize that your application on the same machine, cannot see those sitting in the repository, they are not in the Java Class Path.

Now if you want to break the golden rule of containers and put libraries inside a container in your Java Class Path, we'll come visit you in the funny farm, when you have gone completely mad because Java just started doing the weirdest things.
NEVER DO THAT.

You first option is to just copy the library into your application, but maybe you know that the ones in the container are always well maintained and/or you don't feel like having a duplicate 5 MB library on the same machine.

Then you can use the Harbor Extended Class Loader.
This little sample also uses the test libraries, and just happens to be in a servlet, but it could be in any code.

Using the Containers Class Loader in your Applications.

 


Harbor Symbol

Models, Models, Models! Free Modeling Portfolio! ModelCoast. Photographers! Free Photographic Portfolios. Imagegods. Visit The Best Free Image Hosting.