I'm trying to compile a class that imports another and I keep getting a compiler error which reads:
(for some reason the carat isn't showing up under the semicolon, but that is where is should be) I'm having a hard time finding what that error means. Any suggestions? Regards, Michael [ February 17, 2003: Message edited by: michael bradly ] [ February 17, 2003: Message edited by: michael bradly ] [ February 18, 2003: Message edited by: Marilyn de Queiroz ]
include what package thus SortedListArrayBased belongs e.g. mypackage.util.SortedListArrayBased or if the class (SortedListArrayBased) is on the same directroy or on the classpath create that directly. SortedListArrayBased r = new SortedListArrayBased()
Good to know. I'm using the 1.4 on Unix for the first time and had never seen that compiler error when using 1.3 on windows.. thx for the info..
Originally posted by Dirk Schreckmann: Note that Sun's J2SDK 1.4 compiler won't allow the importing of a class in the default package. So, you cannot import SomeClass; You can only import somePackage.SomeClass
I experienced this probelm too. I solved the problem to remark the import function where I found class. The program was compiled. This problem appiled for the jdk 1.4. For example: import java.io.*; //import myclass; (it is not a package!!!) import mypackage.package.myclass [ February 19, 2003: Message edited by: Zoltan Rajcsanyi ]