This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
From the error posting, I assuming your using an IDE. Its most likely a classpath problem. You don't have the xyz (or for that matter any class in package pack1) on the classpath!
More details on if you using an IDE/command like make it more easier to help. Consider putting up screen shots - kinda of helps to pin point problems faster!