• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

problem with import statement

 
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All
I was using J2SDK1.3 and I just upgraded to J2SDK1.4.2
Then i had a problem with my classes which were compiled correctly before .
I simply import a java class which is not in any package , it's directly under /classes folder , and it was working proberly in the last version of java .
this is my import statement :
=============================
import DBUtilities;
and this is the compilation result error :
============================================
'.' expected
import DBUtilities;
^
I wish anyone can help
thanks alot
 
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1.4 discourages the usage of importing non-packaged classes. Remove the offending import statement, which was never needed to begin with.
That said, you should always put your classes in packages anyway, as you'll discover that other classes in packages will not be allowed access to your non-packaged classes in 1.4
 
hesham katon
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Billybob very much
 
reply
    Bookmark Topic Watch Topic
  • New Topic