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
Joined: Sep 29, 2000
"import xyz.*;" means bring in all the classes in the xyz directory or package. You don't HAVE an xyz directory from your description.
"JavaRanch, where the deer and the Certified play" - David O'Meara
Marilyn de Queiroz
Joined: Jul 22, 2000
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.
JavaBeginnersFaq "Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Joined: Apr 18, 2001
Thanks for the responses. I just grumbled and started moving things to a package. Thanks, Dale L