Read Sun's Setting the Classpath and then see if this tutorial helps. BTW: Only take that 2nd one as far as sounds useful and sensible right now. If it goes beyond what you need, just stop.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi