Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Technology Project and PMC » Problems with Classpaths?
Problems with Classpaths? [message #75835] Mon, 26 January 2009 08:53 Go to next message
Linda is currently offline Linda
Messages: 11
Registered: July 2009
Junior Member
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?

//Linda
Re: Problems with Classpaths? [message #75852 is a reply to message #75835] Mon, 26 January 2009 10:46 Go to previous messageGo to next message
Wayne Beaton is currently offline Wayne Beaton
Messages: 496
Registered: July 2009
Senior Member
Hi Linda. You should probably pose this question on the
eclipse.tools.jdt newsgroup. Having said that...

When you say "added the paths in the project set up", do you mean that
you've added either another project or JAR file using the "Java Build
Path" in the project properties?

Do you have an import for FIL in your blabla class?

If you put your cursor in "FIL" in the class declaration and hit CTRL-1,
do you get any helpful suggestions?

Wayne

Linda wrote:
> 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?
>
> //Linda
>
Re: Problems with Classpaths? [message #75869 is a reply to message #75852] Tue, 27 January 2009 03:59 Go to previous messageGo to next message
Linda is currently offline Linda
Messages: 11
Registered: July 2009
Junior Member
Thank you, I wasnÂŽt sure where to post this actually, posted the question
on the other forum aswell, maybe you think I should continue the
discussion there? Anyhow, since you came up with a lot of questions IÂŽll
continue here until someone says i shouldnÂŽt...

I thought maybe I should clarify what I wantet to do. I am rather new to
Eclipse, my previous programming has been done in Emacs with the help of a
terminal window...

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 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 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 the project. (under the source tab)
Then I went to my other project, where I wanted to use these files, and
added them in the 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 the 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.

best regards
//Linda
Re: Problems with Classpaths? [message #75885 is a reply to message #75869] Tue, 27 January 2009 08:39 Go to previous message
Linda is currently offline Linda
Messages: 11
Registered: July 2009
Junior Member
I found what I needed in the other forum. Thanks anyway!
Re: Problems with Classpaths? [message #601934 is a reply to message #75835] Mon, 26 January 2009 10:46 Go to previous message
Wayne Beaton is currently offline Wayne Beaton
Messages: 496
Registered: July 2009
Senior Member
Hi Linda. You should probably pose this question on the
eclipse.tools.jdt newsgroup. Having said that...

When you say "added the paths in the project set up", do you mean that
you've added either another project or JAR file using the "Java Build
Path" in the project properties?

Do you have an import for FIL in your blabla class?

If you put your cursor in "FIL" in the class declaration and hit CTRL-1,
do you get any helpful suggestions?

Wayne

Linda wrote:
> 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?
>
> //Linda
>
Re: Problems with Classpaths? [message #601941 is a reply to message #75852] Tue, 27 January 2009 03:59 Go to previous message
Linda is currently offline Linda
Messages: 11
Registered: July 2009
Junior Member
Thank you, I wasnÂŽt sure where to post this actually, posted the question
on the other forum aswell, maybe you think I should continue the
discussion there? Anyhow, since you came up with a lot of questions IÂŽll
continue here until someone says i shouldnÂŽt...

I thought maybe I should clarify what I wantet to do. I am rather new to
Eclipse, my previous programming has been done in Emacs with the help of a
terminal window...

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 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 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 the project. (under the source tab)
Then I went to my other project, where I wanted to use these files, and
added them in the 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 the 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.

best regards
//Linda
Re: Problems with Classpaths? [message #601946 is a reply to message #75869] Tue, 27 January 2009 08:39 Go to previous message
Linda is currently offline Linda
Messages: 11
Registered: July 2009
Junior Member
I found what I needed in the other forum. Thanks anyway!
Previous Topic:Problems with Classpaths?
Next Topic:Photran for Galileo?
Goto Forum:
  


Current Time: Wed Jul 30 17:31:46 EDT 2014

Powered by FUDForum. Page generated in 0.01785 seconds