This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
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
Joined: Sep 29, 2000
Posts: 8521
posted
0
"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
Sheriff
Joined: Jul 22, 2000
Posts: 9033
10
posted
0
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
Dale Lobach
Greenhorn
Joined: Apr 18, 2001
Posts: 4
posted
0
Thanks for the responses. I just grumbled and started moving things to a package. Thanks, Dale L