tags:

views:

47

answers:

1

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?

+5  A: 

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.

skaffman