You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Grinvald, Edward" <Ed...@ca.com> on 2002/11/20 23:54:46 UTC

Can't find an import

Hello all,
I'm having a problem where I'm trying to run a <java> task, and it's
giving me the following error:
    [javac] D:\dev\src\Whatever.java:17: '.' expected
    [javac] import PortalJNI;
    [javac]                 ^

Now, the weird things are the following:
PortalJNI is by itself, not in any package, in one of the jars in my lib
directory.
This exact build file works with JDK1.3, I'm using JDK 1.41_01 with
Apache Ant version 1.5 compiled on July 9 2002.
The java file compiles under Jbuilder project with the jar with the
PortalJNI included.

Thank you,

edward

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Can't find an import

Posted by ne...@hotu.com.
You cannot import a class which is in the "default" package.  Move 
PortalJNI into a package and then import it.

The spec is ambiguous, but Sun is saying that this is the proper 
behavior and it is now enforced in JDK 1.4.  My reading of the spec 
concludes differently, but I suppose that's not relevant.

Grinvald, Edward wrote:

>Hello all,
>I'm having a problem where I'm trying to run a <java> task, and it's
>giving me the following error:
>    [javac] D:\dev\src\Whatever.java:17: '.' expected
>    [javac] import PortalJNI;
>    [javac]                 ^
>
>Now, the weird things are the following:
>PortalJNI is by itself, not in any package, in one of the jars in my lib
>directory.
>This exact build file works with JDK1.3, I'm using JDK 1.41_01 with
>Apache Ant version 1.5 compiled on July 9 2002.
>The java file compiles under Jbuilder project with the jar with the
>PortalJNI included.
>
>Thank you,
>
>edward
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>  
>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>