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 compiler not finding com.javaranch.common 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 "compiler not finding com.javaranch.common" Watch "compiler not finding com.javaranch.common" New topic
Author

compiler not finding com.javaranch.common

Tom Henner
Greenhorn

Joined: Jul 04, 2005
Posts: 18
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

Joined: Jul 22, 2000
Posts: 9044
    
  10
I'm not seeing what is causing it not to work. How did you go about changing your CLASSPATH?


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Tom Henner
Greenhorn

Joined: Jul 04, 2005
Posts: 18
**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 ]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: compiler not finding com.javaranch.common
 
Similar Threads
HttpServlet not found on Laptop, but found on Desktop
DaysOld
DaysOld question
OOP-1 (DaysOld): setting classpath
Problem in Assgnemnt OOP-1 "DaysOld"