Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes 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:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

What is CollectionChoice in this code?

 
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have the following code and wherever CollectionChoice is posted i get the error "cannot find symbol class CollectionChoice".. how can i solve it? This is the repository part of a project that is meant for restaurant reviews

 
Marshal
Posts: 76483
366
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Where have you put the collection choice class? If you don't find it within a few seconds, please show us the directory structure of where you are working, and also contents of the CLASSPATH. Write this at a command line/terminal:- echo %CLASSPATH% (Windows®) or echo $CLASSPATH (other OSs).
 
Georgios Adamidis
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:Where have you put the collection choice class? If you don't find it within a few seconds, please show us the directory structure of where you are working, and also contents of the CLASSPATH. Write this at a command line/terminal:- echo %CLASSPATH% (Windows®) or echo $CLASSPATH (other OSs).


There is no CollectionChoice class just a "Restaurant" and "Review" classes
 
Rancher
Posts: 4801
50
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, there must be a CollectionChoice class somewhere as it's not a standard Java class.

Where did you get the above code from?
 
Georgios Adamidis
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Dave Tolls wrote:Well, there must be a CollectionChoice class somewhere as it's not a standard Java class.

Where did you get the above code from?



From my repository class code as was given from my tutor.. As far as i know we're not meant to create a CollectionChoice class
 
Campbell Ritchie
Marshal
Posts: 76483
366
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
. . . and where did you put that repository? How did you add it to your CLASSPATH? Don't add it to any system CLASSPATH; use the -cp option. The CLASSPATH tells the JVM where to find any resources, in this case collection choice. See the Java™ Tutorials. The link at the very bottom right of that page tells you:-

Class paths to the JAR, zip or class files. Each class path should end with a file name or directory depending on what you are setting the class path to, as follows:

   For a JAR or zip file that contains class files, the class path ends with the name of the zip or JAR file.

   For class files in an unnamed package, the class path ends with the directory that contains the class files.

   For class files in a named package, the class path ends with the directory that contains the root package, which is the first package in the full package name.

Multiple path entries are separated by semicolons with no spaces around the equals sign (=) in Windows and colons in Oracle Solaris.

 
Story like this gets better after being told a few times. Or maybe it's just a tiny ad:
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic