Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

import classes that are not part of any package

843798Jun 7 2004 — edited Aug 14 2007
I have this problem with the JDK1.4 compiler:

I have a few classes that were created outside of any package for some JNI uses. When I used JDK1.3 to compile, I was able to get the compiler to find these classes by doing the following in the calling classes:

import ClassOutSideOfPackage;

Now that I am trying to use JDK 1.4, the compiler complains with the following error:

"." expected
import ClassOutSideOfPackage;

I tried to take the import out and had no luck. The compiler complained that it can't find this class. What can I do or is the only solution to change the class to include it in a package and change all relavant JNI native calls... etc. Thank you.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 11 2007
Added on Jun 7 2004
8 comments
433 views