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 servlets 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 "servlets" Watch "servlets" New topic
Author

servlets

Benjoe Reyes
Ranch Hand

Joined: Apr 24, 2002
Posts: 109
i got 2 situations :
1) when i set the classpath to JavaRanchCommon.zip it disables the compiler to see the other classes that i extended or used in composition even if these classes are in the same directory as that of the base class (doing other programs other than cattle drive). so i took off the JavaRanchCommon.zip from the classpath and set it only as needed. this worked well...
the thing is, when i got to servlets i saw the direction: set the classpath to j2ee.jar. this would again go back to the problem. is there any other way to it? isn't j2ee important not only during cattle drives but also in developing real life programs? which means it would need to be permanently in the system unlike JavaRanchCommon.zip so i can't do what i did before.
would it be possible to set the path instead to j2ee.jar like we do in jdk1.x/lib?

2) direction : copy JavaRanchCommon.zip to c:\orion\lib\JavaRanchCommon.jar would this just mean that i rename the file to .jar in dos console?
thanks a many
meri krismas en a hapi nu yir tu ol!!!
in case i won't be able to get online before then he he he
[ December 20, 2002: Message edited by: Benjoe Reyes ]
Peter Gragert
Ranch Hand

Joined: Jan 16, 2001
Posts: 424
A CLASSPATH can point to all needed jar files!
Very often a "." (the active directory) should not be forgotton! The different items should be separated by a ; (semicolon).
Does this help?
Merry Christmas to all readers!
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9044
    
  10
1) when i set the classpath to JavaRanchCommon.zip it disables the compiler to see the other classes that i extended or used in composition even if these classes are in the same directory as that of the base class (doing other programs other than cattle drive). so i took off the JavaRanchCommon.zip from the classpath and set it only as needed. this worked well...

You want to add JavaRanchCommon.zip to your CLASSPATH, not replace your CLASSPATH with it. Your CLASSPATH should contain your base directory as well as the JavaRanchCommon.zip file.

isn't j2ee important not only during cattle drives but also in developing real life programs? which means it would need to be permanently in the system unlike JavaRanchCommon.zip so i can't do what i did before.

Yes. The stated purpose of the first OOP assignment is, "To learn how to use someone else's classes, how to integrate a jar file into your program"

would it be possible to set the path instead to j2ee.jar like we do in jdk1.x/lib?

PATH is different than CLASSPATH. Be sure not to confuse the two. They have different functions.

2) direction : copy JavaRanchCommon.zip to c:\orion\lib\JavaRanchCommon.jar would this just mean that i rename the file to .jar in dos.


Yes.


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Benjoe Reyes
Ranch Hand

Joined: Apr 24, 2002
Posts: 109
thanks people!!!
Benjoe Reyes
Ranch Hand

Joined: Apr 24, 2002
Posts: 109
Originally posted by Marilyn de Queiroz:
You want to add JavaRanchCommon.zip to your CLASSPATH, not replace your CLASSPATH with it. Your CLASSPATH should contain your base directory as well as the JavaRanchCommon.zip file.


miss Marilyn what do you mean by base directory be contained in the classpath? the c:\ dir?
seen your profile ma'am i should say you are one busy lady... music and computer in one
Peter Gragert
Ranch Hand

Joined: Jan 16, 2001
Posts: 424
I think with "Base directory" the directory you are busy is meant : set CLASSPATH = .;c:\thisorthat;d:\classtojavaranch\javaranchcommon.jar;d:\andsoon\peter.jar
See the point in front? Thats to my believe the basedirectory.
Have a good start into 2003!
Benjoe Reyes
Ranch Hand

Joined: Apr 24, 2002
Posts: 109
thanks Peter....
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: servlets
 
Similar Threads
catlle drive oop-1 to 4
Servlets - Java Ranch Tutorial Help
What is "ZoneInfo"?
JavaBeans and class
Problems using GDate and JDate