• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

what is ' . ' expected ??

 
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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()
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
michael bradly
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
This guy is skipping without a rope. At least, that's what this tiny ad said:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic