Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

compiler not finding com.javaranch.common

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic