Re: Instanciate an Object
import Person;
.........
Person p = new Person();
.......
your Person.class should be placed in the working directory.
good luck
Alfred Wu
Re: Instanciate an Object
Hello Alfred,
Thanks for the reply.
However it still doesn't work that way to. I am receiving a message "Class Person not found in import".
The Person class is in the same directory as the other sources files which are going to instanciate it in there bodies.
Do you have any other view of what the problem could be ?
Sincerely.
Askia
Re: Instanciate an Object
To tell the truth, I never encounter this kind of strange problem. I guess that it
might be the several cases :
1. the class name and the file name do not match.
2. setting the classpath overwrites the orignal classpath.
3. the classpath do not set current directory. classpath=.; So the current dirctory is not searched.
4. the class file name imported is not the same as the real file name in the directory.
5.the file is not in the specified directory
The whole thing that I can guess is like above. If it does not work. Sorry..........
I can not help you :)
good luck
Alfred Wu