aspose file tools*
The moose likes Cattle Drive and the fly likes Problem in Assgnemnt OOP-1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "Problem in Assgnemnt OOP-1 "DaysOld"" Watch "Problem in Assgnemnt OOP-1 "DaysOld"" New topic
Author

Problem in Assgnemnt OOP-1 "DaysOld"

Charles HAN
Greenhorn

Joined: Jul 08, 2004
Posts: 10
Hi,
I am using BlueJ to write this assignment and i just cann't compile. What I have done as following:
Step 1: Create a new project "DaysOld" in BlueJ;
Step 2: Copy the zip file "JavaRanchCommon" into "DaysOld" file;
Step 3: in Windows Command Promopt write "set classpath=D:/DaysOld;D:/DaysOld/JavaRanchCommon.zip";
Step 4: write in "DaysOld" class: import com.javaranch.common.*;
Step 5: Compile but it says "com.javaranch.common.* does not exist";
Could someone tell me why and the solution? Thanks so much!
Justin Simpson
Greenhorn

Joined: May 21, 2004
Posts: 17
I don't know if any of this will help, but if you look back at previous posts there are a few issues which have been addressed like the following for example.

Your using another program to write your assignments rather than just the JDK - this might mean there are more issues to look into ?

http://www.coderanch.com/t/4893/Cattle-Drive/DaysOld-assigment-classpath

I know it sounds obvious but you have double checked your spelling etc ? ( I know I have typed something wrong and not noticed it ! ).
Kate Head
Ranch Hand

Joined: Oct 31, 2002
Posts: 67
Hi there,
I've never used BlueJ, so hope this will work for you.
Depending on which version of Windows you're using you need to set the directory where BlueJ stores the .java files in the CLASSPATH (windows98 has the list in autoexec.bat or config.sys (can't remember which, sorry) - I use c:\javaranch and that is in my CLASSPATH list as c:\javaranch; (don't forget the ; at the end of the name).
Once you've set the classpath then restart the PC (not essential with XP, but good practice).
Copy the JavaRanchCommon zip file into that directory.
Have another go at compiling and the system should be able to find the .zip file from the import com.javaranch.common.*; in your DaysOld.java file.
Good Luck.
All the best,
Kate!!
Joyce Lee
Ranch Hand

Joined: Jul 11, 2003
Posts: 1392
I was curious about this BlueJ tool so I installed it on my win98 system. It's free If you compile the code on a prompt window (i.e. without BlueJ), just follow the instuctions given by Kate, it should be fine. But when I used the BlueJ, it still didn't work even with CLASSPATH set in the autoexec.bat (for win98). If you're using win2000, you set it on the Environment Variables. Then I realized you must use BlueJ-->Options-->Preferences-->Libraries and Add the path where your *.zip is stored. After that, exit and relaunch BlueJ to take effect.
Kate Head
Ranch Hand

Joined: Oct 31, 2002
Posts: 67
Well done Joyce!

Charles, I've noticed that you haven't posted anything on the Assignment Log - have you signed up to the CattleDrive?

All the best,
Kate!!
[ July 15, 2004: Message edited by: Kate Head ]
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9052
    
  12
IDEs usually have their own classpath which is independent of the system's classpath which you set in autoexec.bat or in environment variables (depending on which OS you are using).


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

Joined: May 21, 2004
Posts: 17
Does the assignment log give an accurate picture of how many people are on the cattle Drive or are there many who don't post on it ?
Pauline McNamara
Sheriff

Joined: Jan 19, 2001
Posts: 4012
    
    6
Hi Justin,

Does the assignment log give an accurate picture of how many people are on the cattle Drive or are there many who don't post on it ?

Depends on what you mean by accurate

There might be people who don't post to the assignment log, but probably not many. So I think the log gives a fairly good (general) picture of how busy things are.

Then there are all the folks who are theoretically "on the drive", but just aren't very active at present. wink, wink (There's a *lot* of us that fall into that category, alas. )


Pauline
Justin Simpson
Greenhorn

Joined: May 21, 2004
Posts: 17
Would it be right to assume then , if XML assignments come on line, the Nitpickers might be very busy !!!
Joyce Lee
Ranch Hand

Joined: Jul 11, 2003
Posts: 1392
Originally posted by Justin Simpson:
Would it be right to assume then , if XML assignments come on line, the Nitpickers might be very busy !!!


I bet they are. Just imagine the number of students (graduated, active or inactive) in Cattle Drive. This's a time-consuming and highly committed voluntary job, no doubt. The nitpickers should be highly commended for the contribution to the JavaRanch.
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9052
    
  12
There is a link to the inactive students log at the top of the active Assignments log. Some people seem to drop out for a while, but a few come back. Those who have graduated (see )the moose badges page) would be eligible to continue on to the future assignments.
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9052
    
  12
This's a time-consuming and highly committed voluntary job

You are correct. Sometimes more time-consuming than others, but no "time-off" to speak of.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem in Assgnemnt OOP-1 "DaysOld"