Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Path problem with JavaRanchCommon

 
Adam Vinueza
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm having a problem with getting my jdk to recognize the classes in JavaRanchCommon. On my work computer I'm using Windows2000, and I set the path variables as recommended: I have a c:\java directory, put JRC.zip there and unzipped it there, and set the path to both c:\java and c:\java\JavaRanchCommon.zip. I then put "import com.javaranch.common.*" at the top of my DaysOld program.
But I'm getting a "cannot resolve symbol" error when I try to compile DaysOld.java, one telling me javac doesn't recognize the class GDate().
I'm not familiar with Windows2000; I use Windows98 at home, and do most of my work on a unix box via telnet. But I'm not even sure the problem has to do with Windows2000. Does anyone know what I've done wrong? Help!
 
Johannes de Jong
tumbleweed
Bartender
Posts: 5089
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Adam you dont need to unzip JavaRanchCommon.zip for javac to "see" the package simply putting the the zip file in c:\java will suffice.
In your thread you state to set the PATH variable. It should be the CLASSPATH variable. This could be you problem.
Also see This previous thread
Good luck.

[This message has been edited by Johannes de Jong (edited August 02, 2001).]
 
jason adam
Chicken Farmer ()
Ranch Hand
Posts: 1932
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, don't put .zip, change the extension to .jar and put that in your path. You'll probably need to reboot, that should fix it.
I had the same problem you are having, and it wasn't until I changed the extension that things started working, that goes for all jar files that I have downloaded that were in zip format originally.
Hope this helps!
Jason
[This message has been edited by jason adam (edited August 03, 2001).]
 
Johannes de Jong
tumbleweed
Bartender
Posts: 5089
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
changing .zip to .jar Windows 2000 specific ? surely not !!. I never had to do that on Windows 98 tough.
Any ideas anybody ??

[This message has been edited by Johannes de Jong (edited August 03, 2001).]
 
jason adam
Chicken Farmer ()
Ranch Hand
Posts: 1932
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Might be W2K specific, as that's what I run, and I have always had to change the extension for the classpath to work. Of course, this might also have to do with the associations that I have on what applications read jar files and what applications read zip.
Jason
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic