Hi all!
I have been doing Java a bit but just been putting my .class files in the same dir.
Everything works fine.
I have started looking at packages to make a better structure in my projects.
I just made a test and didn't got it working.
My structure is like: /home/marcux/HandleProject/one
In dir "one" I put Test.java
At the top I wrote
package one;
I made a subpackage called "two" so structure: /home/marcux/HandleProject/one/two.
At top of file Show.java I put:
package one.two;
I compiles Show.java, no problem.
In Test.java I made an instance of object "Show" like:
Show s = new Show();
After that I tried to compile and got the error: can not find symbol.
Aha... CLASSPATH, rihgt??
So I wrote in my terminal:
export CLASSPATH=/home/marcux/HandleProject/one
Still gets the same error at compiletime??
Tried with:
import one.*;
in Test.java
Still no luck!
Compiling with the files in same dir without package my test program works fine!
What am I doing wrong???
Many many thanks!
Marcux