• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Package ... not found errors with 1.4

 
Dale Lobach
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just installed 1.4.0_01 and am having problems importing class files in the same directory.
If I have xyz.class (simple utilities compiled with 1.4.0_01) in the same directory as the current program, and I use:
import xyz.*;
in the current program, I get the error "Package xyz.class does not exist." This is new to 1.4. I've not seen this in previous versions. I've tried setting the CLASSPATH, eliminating the CLASSPATH, checked the PATH,... and I'm having no luck getting 1.4 to find the external class. Help is appreciated.
Thanks,
Dale L
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"import xyz.*;" means bring in all the classes in the xyz directory or package. You don't HAVE an xyz directory from your description.
 
Marilyn de Queiroz
Sheriff
Posts: 9059
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Dale Lobach:
If I have xyz.class (simple utilities compiled with 1.4.0_01) in the same directory as the current program, and I use:
import xyz.*;
in the current program, I get the error "Package xyz.class does not exist."

If you want to import a class, I think you would use
import MyClass ;
not
import MyClass.* ;

but that won't solve your problem. Refer to this thread which in turn refers to this thread for a discussion of this development which is new to jdk1.4.
 
Dale Lobach
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the responses. I just grumbled and started moving things to a package.
Thanks,
Dale L
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic