>package test2;
you can't do that. You have to keep all your package names relative
to the same base directory.
see http://mindprod.com/jgloss/package.html
and http://mindprod.com/jgloss/import.html
--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
Hi,
I solved that prob, I believe
I changed each class's package directive to be:
for t1/test/test2/Pref.java: package t1.test.test2;
for t1/test/PrefBean.java: package t1.test;
for t1/UsePref.java: package t1;
and the import directives to
for t1/test/PrefBean.java:
import t1.test.test2.*;
for t1/UsePref.java:
import t1.test.test2.*;
import t1.test.*;
then I went to the parent directory of t1 and did:
javac -d . t1/*.java
this caused all the classes to compile.
and my computer to smile :-]
the article that helped was:
http://www.cs.wisc.edu/~hasti/cs368/JavaTutorial/NOTES/Packages.html
I'll be posting my 3rd problem shortly.
Thanks for being a listening post,
kind regards,
Luke
> Hi,
>
[quoted text clipped - 79 lines]
> kind regards,
> Luke
Roedy Green - 20 Sep 2003 19:04 GMT
>I changed each class's package directive to be:
>for t1/test/test2/Pref.java: package t1.test.test2;
>for t1/test/PrefBean.java: package t1.test;
>for t1/UsePref.java: package t1;
Normally you put more than one class in package, but you seem to have
grasped the naming conventions.
--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.