Reputation: 1259
Consider if I have got a Package in my C:\x\y\z and another package in D:\m\n\o. How can I access them in my java program? Do I need to set any path?
Upvotes: 3
Views: 1106
Reputation: 403471
You need to set your classpath to add each directory. Assuming that your package structure begins underneath each of those directories:
java -classpath C:\x\y\z;D:\m\n\o <MyClassName>
See docs.
Upvotes: 7