Solved

Package organization - Eclipse

Posted on 2010-11-20
4
564 Views
Last Modified: 2013-12-15

Hi (again),

For a project of mine, I have the directory hierarchy given in the image attached (11.jpg)

 directory/package hierarchy
I am trying to get this project working on Eclipse, which (needless to say) I am new to.

The issue is with the java files in the JavaBayesInterface package/directory. They all import the class file JavaBayes.class (stored one directory above them) [i.e. I have src/JavaBayes.java and src/JavaBayesInterface containing files that start with import Javabayes;]. The image below shows a sample file located in JavaBayesInterface, namely ClearDialog.java

 Eclipse Hierarchy/Erros
Now, in eclipse, i started a new project, copied everything to it and created a new package. However, eclipse doesn't see JavaBayes.java and all the import statements give me an error (import JavaBayes cannot be resolved) as the eclipse snapshot shows.

My question is: how can I make these files see JavaBayes?

Thank you very much in advance. Your help is appreciated.

0
Comment
Question by:zibrahim
  • 2
  • 2
4 Comments
 
LVL 17

Accepted Solution

by:
sweetfa2 earned 500 total points
ID: 34180744
Try adding the JavaBayes directory as another source directory in your build path for the project.
0
 

Author Comment

by:zibrahim
ID: 34180746
I've already done that :(
0
 
LVL 17

Expert Comment

by:sweetfa2
ID: 34180779
In one of your files try putting 'include default.JavaBayes...'

0
 

Author Comment

by:zibrahim
ID: 34194239
Well, after refreshing many times, the project somehow 'organized itself' and now everything sees everything.....thank you.
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

816 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now