• 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
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

Package fustration

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I need help with packages.

I totally understand the whole point of importing, but what can you do if you get "package ... does not exist" when you are importing a package that you think does exist?

Is there a command or check you can run to see if a package has been created or exists?

This is frustrating because I'm copying examples out of the Head first Servlets and JSP book, have done everything as required (Page 85 of book) when it comes to importing a package called com.example.model.*; I get told this package doesn't exist! but the directory does exist, with the file which needs to be imported, so I'm assuming the package should.



So if I know the directory exists, how can I debug this problem?

Any help/suggestions would be much appreciated.
 
Ranch Hand
Posts: 221
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This sounds like a classpath problem - have you checked that your classpath includes the package in question?
 
Rik Abel
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Cheers, it was a classpath issue alright.

Read some stuff about how multiple classpaths can be set, seperate them with a ';' (in Windows).

This link was useful to me:

http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/classpath.html

 
Warning! Way too comfortable! Do not sit! Try reading this tiny ad instead:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic