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

compiler not finding com.javaranch.common

 
Tom Henner
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My CattleDrive classes and java files are in c:\java5\javaranch folder.
To support the DaysOld assignment, I copied jr.jar into that folder.
I changed my classpath, adding c:\java5\javaranch\jr.jar; to my last entry, which was c:\java5\javaranch;. Then I rebooted.
I need to reference GDate and JDate that are in jr.jar, and I am trying to get to them through import com.javaranch.common.* ; as my first statement in DaysOld. When I compile at c:\java5\javaranch the compiler complains that com.javaranch.common does not exist. What step am I missing?
 
Marilyn de Queiroz
Sheriff
Posts: 9059
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not seeing what is causing it not to work. How did you go about changing your CLASSPATH?
 
Tom Henner
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
**UPDATED- FIXED** I had not accepted changes in both steps.
""After making your changes, click on the OK button on both the Environment Variables dialog and the System dialog. You will not need to restart your computer, but you will need to restart any applications which may have read the CLASSPATH settings before your changes (including any Command Prompt windows).""

I'm running Windows 2000 and went to Start>>Settings>>Control Panel>>System>>Advanced>>Environmental Variables and highlighted CLASSPATH from the System Variables window and selected edit. CLASSPATH now looks like this:

C:\Program Files\Microsoft Visual Studio\Common\Tools\WinNT;C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin;C:\Program Files\Microsoft Visual Studio\Common\Tools;C:\Program Files\Microsoft Visual Studio\VC98\bin;C:\Program Files\Microsoft SDK for Java 4.0\Bin;c:WINNT\JAVA\Classes\Classes.zip;C:\Program Files\Microsoft ActiveSync;c:\tom\source;c:\java5\javaranch; c:\java5\javaranch\jr.jar;

Tom

[ September 14, 2005: Message edited by: Tom Henner ]
[ September 14, 2005: Message edited by: Tom Henner ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic