This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Cattle Drive and the fly likes packages; *.zip; *.jar & import Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "packages; *.zip; *.jar & import" Watch "packages; *.zip; *.jar & import" New topic
Author

packages; *.zip; *.jar & import

Donald R. Cossitt
buckaroo
Ranch Hand

Joined: Jan 31, 2003
Posts: 401
I am working ahead in the CattleDrive while waiting for current nitpick to arrive.
Assignment OOP-1 (DaysOld) requires the downloading of a *.zip file and re-configuration of classpath. Two preliminary questions:
1. Is a *.zip == *.jar?
2. Does simply renaming a file to someFile.jar from someFile.zip make a zip file a jar file?

Finally, the real problem. No matter how I configure the classpath this error occurs at runtime with the required import statement in the java file:

I even changed my folder structure to match that in the example and placed the given path example in classpath with the same error.
What gives?
TIA
doco


doco
Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
The answer to questions 1 and 2 are yes. I don't know if this is the cause of your problem, but it looks like you are trying to import a class called common from the package com.javaranch. You probably want to import something different. Is that cryptic enough.


Matthew Phillips
Donald R. Cossitt
buckaroo
Ranch Hand

Joined: Jan 31, 2003
Posts: 401
Matthew;
Thanks for the answers. You hit the nail on the head - this bonehead! Your encryption pointed me to the problem. I was not referring to some file named common. That was the least node in the hierarchy; what I didn't do was place the ".*" at the end! Jeesh what a bonehead! :roll:
Well then, it seems I'm back in the saddle again!
Thanks
doco
[ March 09, 2003: Message edited by: doco mastadon ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: packages; *.zip; *.jar & import
 
Similar Threads
Classpath problem (probably typical)
OOP1 Classpath issue
Cattle drive - Classes and Objects
OOP-1 (DaysOld): setting classpath
catlle drive oop-1 to 4