473,465 Members | 1,931 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Question using inheritance with packages

Gil
Hi,

I have 2 classes in a package. One class inherits from the other. I
had no problems compiling the classes when the classes weren't in a
package, but as soon as I put the classes in a package and appropriate
directories, I get the error :

cannot resolve symbol
symbol : class Base

My code, each class is in a different file in the same directory :

in directory first\second :

Base.java :

package first.second;

public class Base {
};

A.java :

package first.second;

public class A extends Base {

};

Can anyone see what I'm doing wrong?

Thanks,

Gil
Jul 17 '05 #1
1 3522
> I have 2 classes in a package. One class inherits from the other. I
had no problems compiling the classes when the classes weren't in a
package, but as soon as I put the classes in a package and appropriate
directories, I get the error :

cannot resolve symbol
symbol : class Base

Check your classpath to make sure that the package directory is in the
path in the right place i.e. if you have a package foo with a class
bar in your directory structure c:\java\foo then c:\java has to be in
your classpath. Java will take care of the rest.

mypetrock
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Tobias Windeln | last post by:
Hi! I'm looking for suggestions on object-based inheritance in Python. Automatic forwarding (often called delegation) in Python is easy: def __getattr__(self, attr): return...
2
by: John Pollins | last post by:
Greetings, We are trying to set up a set of "Leading Practices" for our developers, as well as ourselves, and hope some gentle reader can recommend some documentation in favor of what appears to...
2
by: Tony Johansson | last post by:
Hello Experts!! Here we use multiple inheritance from two classes.We have a class named Person at the very top and below this class we have a Student class and an Employee class at the same...
1
by: Peter Hartmann | last post by:
How do I influence the platform type during install? Could you look at this and tell me what I'm doing wrong? It's still using information from get_platform instead of using my preference. #...
6
by: Peter Oliphant | last post by:
I just discovered that the ImageList class can't be inherited. Why? What could go wrong? I can invision a case where someone would like to add, say, an ID field to an ImageList, possible so that...
6
by: Grahamo | last post by:
Hi, I'd like to get the opinion of this knowledgable group. Basically we have 100 billions lines of legacy code that were written in 1930. Hence there are no stl containers, no std::strings...
1
by: relient | last post by:
Hi, I just started the chapter on "Inheritance" and I'm a bit confused so I have three questions: first, here's the code: using System; using System.Collections.Generic; using System.Text; ...
6
by: tshad | last post by:
I am playing with Inheritance and want to make sure I understand it. I have the following Classes: ******************************************* Public Class AuthHeader:Inherits SoapHeader Public...
7
by: jason | last post by:
In the microsoft starter kit Time Tracker application, the data access layer code consist of three cs files. DataAccessHelper.cs DataAcess.cs SQLDataAccessLayer.cs DataAcccessHelper appears...
14
by: JoeC | last post by:
I have been writing games and I also read about good programming techniques. I tend to create large objects that do lots of things. A good example I have is a unit object. The object controls...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.