Problems with Classpaths? [message #258305] |
Tue, 27 January 2009 03:33  |
Eclipse User |
|
|
|
Hello
I have a problem with paths, I think.
I have a package of files that i want to use, some interfaces and stuff,
and I have as it seems sucessfully added the paths in project setup (since
when writing "import blablabla" it suggests my catalogue). But now that i
try to use the interfaces and types from the catalogue Eclipse tells me
itŽs not working:
ie I have an interface called FIL and writing a new class "public class
blabla implements FIL" eclipse tells me that:
"FIL cannot be resolved to a type"
I have the same problem in every class that uses these files so my guess
is that I have missed something with the classpaths?
I am not sure what IŽm asking but does this sound familiar to anyone, and
how do I fix it?
Im rather new to Eclipse, my programming usually involves Emacs and a
terminal window.
//Linda
|
|
|
|
Re: Problems with Classpaths? [message #258312 is a reply to message #258308] |
Tue, 27 January 2009 04:14   |
Eclipse User |
|
|
|
Yes, both things are done.
I thought maybe I should clarify what I wantet to do.
I have recieved a bunch of java files (that are all in a package) in an
zip file in an email. I extracted the zipfile. This is just a normal file
system, no .jar files och project files or anything like that, just
folders and .java files.
In the emacs/terminal case (since that is what IŽm used to) I would have
just: compiled the package files and set up a classpath in my catalogue
where the java files I wantet do use them in is and after that I would
have imported the classes I wanted to use in the beguinning of my java
file.
Now what I first have done is that I had to create a new java project
(lets call it project A) to witch i imported the filesystem.
After that I got kind of lost, this is nothing I am sure if itŽs right or
not:
I wanted to compile the files in some way so I added them to the build
path of project A, under the source tab. Then I went to my other
project(project B), where I wanted to use these files, and added them in
project B:s build path to, but under the library path. And since there is
no .jar file I added them as class librarys. Then i could write Import
source.bla.bla.bla which is where my FIL interface is (no red x:es) But
when I try to use FIL eclipse says "FIL cannot be resolved to a type" and
suggests that I fix this problem by adding an Import bla.bla.bla (which is
similar but not the same as the one IŽve added since the one I added also
has the source. added first in the package name). When I select the Import
line that Eclipse suggests as a solution to my problem, it is marked red
and is given the comment "the import bla.bla.bla cannot be resolved"
IŽm not sure this explains any further what my problem is, but hopefully
someone might be able to help. Maybe I did some mixup when i imported the
files to beguin with?
|
|
|
Re: Problems with Classpaths? [message #258316 is a reply to message #258312] |
Tue, 27 January 2009 05:46   |
Eclipse User |
|
|
|
Linda wrote:
> Yes, both things are done.
>
> I thought maybe I should clarify what I wantet to do.
> I have recieved a bunch of java files (that are all in a package) in
> an zip file in an email. I extracted the zipfile. This is just a
> normal file system, no .jar files och project files or anything like
> that, just folders and .java files.
> In the emacs/terminal case (since that is what IŽm used to) I would
> have just: compiled the package files and set up a classpath in my
> catalogue where the java files I wantet do use them in is and after
> that I would have imported the classes I wanted to use in the
> beguinning of my java file.
> Now what I first have done is that I had to create a new java project
> (lets call it project A) to witch i imported the filesystem.
> After that I got kind of lost, this is nothing I am sure if itŽs right
> or not:
>
> I wanted to compile the files in some way so I added them to the build
> path of project A, under the source tab. Then I went to my other
> project(project B), where I wanted to use these files,
If you have project A in source then you only need to add that project
to the 'Projects' tab of B's Java Build path.
Dani
> and added them in project B:s build path to, but under the library
> path. And since there is no .jar file I added them as class librarys.
> Then i could write Import source.bla.bla.bla which is where my FIL
> interface is (no red x:es) But when I try to use FIL eclipse says
> "FIL cannot be resolved to a type" and suggests that I fix this
> problem by adding an Import bla.bla.bla (which is similar but not the
> same as the one IŽve added since the one I added also has the source.
> added first in the package name). When I select the Import line that
> Eclipse suggests as a solution to my problem, it is marked red and is
> given the comment "the import bla.bla.bla cannot be resolved"
>
> IŽm not sure this explains any further what my problem is, but
> hopefully someone might be able to help. Maybe I did some mixup when i
> imported the files to beguin with?
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.03234 seconds