Sorry to ask a quite common question but I can't find a working answer. I just want to compile using javac several source files organized like this:
- AdaptiveHuffmanCoding/
- Encoder.java
- Decoder.java
- FullBinaryTree/
- Node.java
- Tree.java
For example, if I run
javac FullBinaryTree/Node.java
it works OK the class file is produced.
But if I run
javac FullBinaryTree/Tree.java
it will fail, reporting every Node appearance with an unknown symbol error.
As you can see the 2 files are in the same package so I'm not using any import and they are sharing the same 1st line namely
package AdaptiveHuffmanCoding.FullBinaryTree;
I guess I have to tell the compiler where to find this Node but I'm actually struggling with it. If someone could explain.
Thanks
classpathto tell compiler where to find other classes