I'm using NT now,and want to import some external file to my program.
But whenever I tried 'import',it only works with 'java.awt.*','java.util.*',and
something like that,while couldn't find some other java file I put by myself.I
tried to compiled some files which worked well before,now they failed!
Is it all right for me do like this:
\myprogram.java (import Io.pack.Io)
\Iopack(a directory)
Why?
Thanks a lot!
03-20-2000, 11:05 AM
Tom Duffy
Re: import
Hello Huiyuanm:
Any file that you import must be referenced in your classpath environment
variable. Have you modified your classpath to point to your new files?
Tom
"Huiyuanm" <mahuiyuan@yahoo.com> wrote:
>
>I'm using NT now,and want to import some external file to my program.
>But whenever I tried 'import',it only works with 'java.awt.*','java.util.*',and
>something like that,while couldn't find some other java file I put by myself.I
>tried to compiled some files which worked well before,now they failed!
>Is it all right for me do like this:
>\myprogram.java (import Io.pack.Io)
>\Iopack(a directory)
>
>Why?
>
>
>
>
>Thanks a lot!
03-31-2000, 12:49 PM
Vikram Rajan
Re: import
What you need to do is include the current path in the CLASSPATH environment
variable. The current path is denoted by ".", so all you have to do is append
"." to the CLASSPATH variable.