importing errors that make no sense

G

grubbawubba

I am having a problem with java that is kinda stupid but here it
is...my professor is having us write code using the google soap search
api, and hes having us organize it into separate packages. I have 1
package known as jss2 and another named after my school. Both
packages are in the same overall directory. My problem is as
follows...when i am within the package named fro my school, I have a
driver class and a class that contains 1 constructor and 2 methods (1
private and 1 public). When I attempt to run my driver class and use
the public method from the other class, i get the error "Symbol not
found". I have tried to specifically import this class as well as
everything in the package as well as trying to import nothing. None
of those methods work. Both classes have the package named declared
at the top before everything else. Is there anyone who would know why
this stupid error (which prevents me from doing anything else in the
project) would occur? Also i need to be able to import files from the
jss2 package....and import jss2.*; doesnt work. We haven't really
gone over packaging in my class so im at a loss as to what I should be
doing. If someone could help i would really appreciate it

thanks
 
K

Karl Uppiano

I am having a problem with java that is kinda stupid but here it
is...my professor is having us write code using the google soap search
api, and hes having us organize it into separate packages. I have 1
package known as jss2 and another named after my school. Both
packages are in the same overall directory. My problem is as
follows...when i am within the package named fro my school, I have a
driver class and a class that contains 1 constructor and 2 methods (1
private and 1 public). When I attempt to run my driver class and use
the public method from the other class, i get the error "Symbol not
found". I have tried to specifically import this class as well as
everything in the package as well as trying to import nothing. None
of those methods work. Both classes have the package named declared
at the top before everything else. Is there anyone who would know why
this stupid error (which prevents me from doing anything else in the
project) would occur? Also i need to be able to import files from the
jss2 package....and import jss2.*; doesnt work. We haven't really
gone over packaging in my class so im at a loss as to what I should be
doing. If someone could help i would really appreciate it

thanks

Am I understanding your statement correctly -- that you have two different
packages in the same directory? That won't work. Except for slashes vs.
dots, the package names and directory path must agree from your class path
root on down.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,270
Messages
2,571,102
Members
48,773
Latest member
Kaybee

Latest Threads

Top