Home » Language IDEs » Java Development Tools (JDT) » including other dependencies? 
| including other dependencies? [message #120489] | 
Mon, 24 November 2003 17:05   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Originally posted by: list.redpoint.org.uk 
 
Hi, 
 
I've just been playing with eclipse 2.1.2 and JDT to see how it manages an 
existing Java project ... but as yet I can't get it to build. 
 
Normally I just set: 
 
export  CLASSPATH=/home/fred/some/directory/with/the/classes:$CLASSP ATH 
export  LD_LIBRARY_PATH=/home/fred/some/directory/with/compiled/bina ries 
 
and from then on my java is happy as it can find the files and the jni 
libs it needs when compiling and running the app. 
 
I've spent a few hours now trying to get it to build from within eclipse 
and little to show for it other than a lot of failed import statments. All 
I need to do is add the classpath to the project setting in some way, I 
seem to be able to find some stuff that looks like it needs the classes to 
be in a .jar (they arent) and evertying else seems to expect the classes 
to be in another eclipse project (they arent) ...  
 
Any help gratefully rx. 
 
Oh, and when importing some files scattered around the disk into a 
project, how do you stop eclipse generating the (totally irrelevant) set 
of parent directories? ... eg just because the files I want to import into 
the projects are deep, deep in a directory tree, I dont want all the 
subdirs generated ... i just want to import the files themselves into a 
folder. 
 
thanks.
 |  
 |  
  |  
| Re: including other dependencies? [message #120577 is a reply to message #120489] | 
Mon, 24 November 2003 20:19    | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Hi Robin, 
 
Did you already try going to the Project Properties page to add the  
proper classpath? 
 
To be precise, right click on the project, select Properties, click on  
Java Build Path.  Go to tab Libraries, and try either Add External JARs  
.... or Add Class Folder ... 
 
As for the import, Eclipse will always start importing the structure  
under the "root" that you specifies.  In other works, make sure you  
specify the direct container of what you want to import in the "From  
directory:" field, and you should be ok. 
 
Hope this helps. 
 
Mike K. 
 
robin wrote: 
> Hi, 
>  
> I've just been playing with eclipse 2.1.2 and JDT to see how it manages an 
> existing Java project ... but as yet I can't get it to build. 
>  
> Normally I just set: 
>  
> export  CLASSPATH=/home/fred/some/directory/with/the/classes:$CLASSP ATH 
> export  LD_LIBRARY_PATH=/home/fred/some/directory/with/compiled/bina ries 
>  
> and from then on my java is happy as it can find the files and the jni 
> libs it needs when compiling and running the app. 
>  
> I've spent a few hours now trying to get it to build from within eclipse 
> and little to show for it other than a lot of failed import statments. All 
> I need to do is add the classpath to the project setting in some way, I 
> seem to be able to find some stuff that looks like it needs the classes to 
> be in a .jar (they arent) and evertying else seems to expect the classes 
> to be in another eclipse project (they arent) ...  
>  
> Any help gratefully rx. 
>  
> Oh, and when importing some files scattered around the disk into a 
> project, how do you stop eclipse generating the (totally irrelevant) set 
> of parent directories? ... eg just because the files I want to import into 
> the projects are deep, deep in a directory tree, I dont want all the 
> subdirs generated ... i just want to import the files themselves into a 
> folder. 
>  
> thanks. 
>
 |  
 |  
  |  
| Re: including other dependencies? [message #121621 is a reply to message #120577] | 
Tue, 25 November 2003 06:48    | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Originally posted by: list.redpoint.org.uk 
 
Michael Y Kwong wrote: 
 
> Hi Robin, 
 
> Did you already try going to the Project Properties page to add the  
> proper classpath? 
 
> To be precise, right click on the project, select Properties, click on  
> Java Build Path.  Go to tab Libraries, and try either Add External JARs  
> .... or Add Class Folder ... 
 
yes ... this does not seem to work. The classes are not in a JAR so the 
'add external JAR' is not appropriate, and the 'add class folder' is only 
appropriate for folders within the eclipse workspace. The classes are 
actually in /usr/local/.... as they are on production machines that my 
software runs on, and you cannot navigate outside the eclipse workspace to 
/usr/local using the Add Class Folder tool ... 
 
 
> As for the import, Eclipse will always start importing the structure  
> under the "root" that you specifies.  In other works, make sure you  
> specify the direct container of what you want to import in the "From  
> directory:" field, and you should be ok. 
 
hmmm ... ok so lets say I want to import some classes that currently 
reside in /home/robin/projects/test/version2/source/*.java 
 
I have created a new project called 'Test'  and a folder in it called 
'core' and I'd like to get the java files from above imported directly 
into the 'core' folder. I dont need the structure below them 
(/home/robin/projects/test/version2/source) as that is just where they 
happen to be at the moment, but everything I have tried so far results in 
creating all  the underlying folders within the eclipse project workspace. 
Ive tried both the 'create complete folder structure' and 'create selected 
folders only' and the result seems to be the same. Even in 'create 
selected folders only' all the parent folders are 'ticked' in the 
selection tool, and you cannot de-select them without deselecting the 
folder you actually want ... 
 
 
> Hope this helps. 
 
> Mike K. 
 
> robin wrote: 
> > Hi, 
> >  
> > I've just been playing with eclipse 2.1.2 and JDT to see how it manages an 
> > existing Java project ... but as yet I can't get it to build. 
> >  
> > Normally I just set: 
> >  
> > export  CLASSPATH=/home/fred/some/directory/with/the/classes:$CLASSP ATH 
> > export  LD_LIBRARY_PATH=/home/fred/some/directory/with/compiled/bina ries 
> >  
> > and from then on my java is happy as it can find the files and the jni 
> > libs it needs when compiling and running the app. 
> >  
> > I've spent a few hours now trying to get it to build from within eclipse 
> > and little to show for it other than a lot of failed import statments. All 
> > I need to do is add the classpath to the project setting in some way, I 
> > seem to be able to find some stuff that looks like it needs the classes to 
> > be in a .jar (they arent) and evertying else seems to expect the classes 
> > to be in another eclipse project (they arent) ...  
> >  
> > Any help gratefully rx. 
> >  
> > Oh, and when importing some files scattered around the disk into a 
> > project, how do you stop eclipse generating the (totally irrelevant) set 
> > of parent directories? ... eg just because the files I want to import into 
> > the projects are deep, deep in a directory tree, I dont want all the 
> > subdirs generated ... i just want to import the files themselves into a 
> > folder. 
> >  
> > thanks. 
> >
 |  
 |  
  |  
| Re: including other dependencies? [message #121644 is a reply to message #120577] | 
Tue, 25 November 2003 07:26    | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Originally posted by: list.redpoint.org.uk 
 
Michael Y Kwong wrote: 
 
> As for the import, Eclipse will always start importing the structure  
> under the "root" that you specifies.  In other works, make sure you  
> specify the direct container of what you want to import in the "From  
> directory:" field, and you should be ok. 
 
ahh OK .. I got that to work. I was just clicking on the icons in the 
browse window, It worked when I got the right combination of stuff in 
those windows .. I hadnt appreciated that you needed to get the path in th 
top window right as well as the clicking in the file select window, i had 
assumed that the text entry was a duplicate of the file select .. 
 
anyway that bit worked out, its just the external classes that remain .. 
 
> Hope this helps. 
 
> Mike K. 
 
> robin wrote: 
> > Hi, 
> >  
> > I've just been playing with eclipse 2.1.2 and JDT to see how it manages an 
> > existing Java project ... but as yet I can't get it to build. 
> >  
> > Normally I just set: 
> >  
> > export  CLASSPATH=/home/fred/some/directory/with/the/classes:$CLASSP ATH 
> > export  LD_LIBRARY_PATH=/home/fred/some/directory/with/compiled/bina ries 
> >  
> > and from then on my java is happy as it can find the files and the jni 
> > libs it needs when compiling and running the app. 
> >  
> > I've spent a few hours now trying to get it to build from within eclipse 
> > and little to show for it other than a lot of failed import statments. All 
> > I need to do is add the classpath to the project setting in some way, I 
> > seem to be able to find some stuff that looks like it needs the classes to 
> > be in a .jar (they arent) and evertying else seems to expect the classes 
> > to be in another eclipse project (they arent) ...  
> >  
> > Any help gratefully rx. 
> >  
> > Oh, and when importing some files scattered around the disk into a 
> > project, how do you stop eclipse generating the (totally irrelevant) set 
> > of parent directories? ... eg just because the files I want to import into 
> > the projects are deep, deep in a directory tree, I dont want all the 
> > subdirs generated ... i just want to import the files themselves into a 
> > folder. 
> >  
> > thanks. 
> >
 |  
 |  
  |  
| Re: including other dependencies? [message #121696 is a reply to message #120489] | 
Tue, 25 November 2003 09:50   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Originally posted by: eclipse-user.jibeinc.com 
 
robin wrote: 
> Hi, 
>  
> I've just been playing with eclipse 2.1.2 and JDT to see how it manages an 
> existing Java project ... but as yet I can't get it to build. 
>  
> Normally I just set: 
>  
> export  CLASSPATH=/home/fred/some/directory/with/the/classes:$CLASSP ATH 
> export  LD_LIBRARY_PATH=/home/fred/some/directory/with/compiled/bina ries 
>  
> and from then on my java is happy as it can find the files and the jni 
> libs it needs when compiling and running the app. 
>  
> I've spent a few hours now trying to get it to build from within eclipse 
> and little to show for it other than a lot of failed import statments. All 
> I need to do is add the classpath to the project setting in some way, I 
> seem to be able to find some stuff that looks like it needs the classes to 
> be in a .jar (they arent) and evertying else seems to expect the classes 
> to be in another eclipse project (they arent) ...  
 
The best approach is to create a Project in Eclipse to hold your source  
code. If you have a "common" set and then application-specfic sets that  
depend on "common", create separate Projects for "common" and then a  
Project for each application. 
 
I strongly recommend you spend the time to go through the Tutorial that  
comes with the installed Eclipse help. It will give you the overview  
information you need to understand how Eclipse works with Projects as  
well as external classes. 
 
BTW, you can include external classes in your Project Build Path by  
defining a Java Classpath Variable in the Preferences and then adding  
that variable to your Project's Java Build Path. But that is like going  
from New York to Chicago via Los Angeles - not the best route. 
Use Projects in Eclipse - they are your friend. 
 
HTH, 
	Eric 
--  
Eric Rizzo 
Software Architect 
Jibe, Inc. 
http://www.jibeinc.com
 |  
 |  
  |   
Goto Forum:
 
 Current Time: Mon Nov 03 22:01:21 EST 2025 
 Powered by  FUDForum. Page generated in 0.04599 seconds  
 |