Originally posted by Tim Moore:
Hi,
I have installed 1.4.2 on my machine. I have created a subdirectory called "work" to hold my work. The full path is c:\j2sdk1.4.2\bin\work. How do I specify that directory as a package name in my .java source files? Won't the periods in the directory c:\j2sdk1.4.2 create confusion in package statement? In the future, I plan to save my work to another directory that has no periods in the path name, away from the JDK directory, however, the question still remains. What do you think?
Thanks,
Tim
If you are just going to be doing 'work' on your own and everything is going to reside in this folder, then a better structure would be to make subdirectories under your work folder for each project you are doing.
EX: c:\j2sdk1.4.2\bin\work\proj1
Then when you want to use a class from another project, all you have to do is:
import projX.*;
or
import projX.ClassName;
This is a benefit from setting your classpath.
However, if you are going to be distributing your 'work' to other people, then consider setting up a structure such as:
These examples