• 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:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Problem in Assgnemnt OOP-1 "DaysOld"

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ?

https://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 ! ).
 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!!
 
Ranch Hand
Posts: 1392
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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).
 
Justin Simpson
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ?
 
Sheriff
Posts: 4012
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Would it be right to assume then , if XML assignments come on line, the Nitpickers might be very busy !!!
 
Joyce Lee
Ranch Hand
Posts: 1392
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
My pie came with a little toothpic holding up this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic