Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with import statement

 
hesham katon
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • 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
 
Billybob Marshall
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Thank you Billybob very much
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic