aspose file tools*
The moose likes Java in General and the fly likes problem with import statement Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "problem with import statement" Watch "problem with import statement" New topic
Author

problem with import statement

hesham katon
Ranch Hand

Joined: Dec 18, 2002
Posts: 82
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


Hesham Katon<br />SCJP 1.2<br />SCWCD 1.4<br />Better to light a candle than to curse the darkness
Billybob Marshall
Ranch Hand

Joined: Jan 27, 2004
Posts: 202
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

Joined: Dec 18, 2002
Posts: 82
Thank you Billybob very much
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem with import statement
 
Similar Threads
Packages Vs interfaces Vs Imports
initialising db connection
header files in Java?
Unable To compile Servlets and Jsp
Displaying Items in an object in JSP