It's not a secret anymore!
The moose likes Beginning Java and the fly likes package problems... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "package problems..." Watch "package problems..." New topic

package problems...

Prashanth Lingala
Ranch Hand

Joined: Nov 13, 2004
Posts: 66
Hi Friends...
I got a peculiar problem...

i have a directory c:\first in which i have placed
i have a directory c:\second in which i have placed

Here's the source:

and compiles fine
So far so good...
when i compile from c:\second on the command prompt

i get the following error

C:\second>javac package first does not exist
import first.*;
^ cannot resolve symbol
symbol : class A
location: class second.B
class B extends A {}
2 errors

I dont know what mistake i am making...???
kindly explain me...

Have A Nice Day !!!
A Kumar
Ranch Hand

Joined: Jul 04, 2004
Posts: 980

Ur package A is not in the classpath...

Set it and u wud be on ur way..

Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
If you need help with setting your CLASSPATH, see this page from our friendly FAQ!


Java API Documentation
The Java Tutorial
I agree. Here's the link:
subject: package problems...
It's not a secret anymore!