Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Trying to use org.apache Packages
Trying to use org.apache Packages [message #199618] Thu, 15 March 2007 02:15 Go to next message
Eclipse UserFriend
Originally posted by: clay.gmx.at

Hi there,

I am more or less a Java and eclipse newbie, so please bear with me :)

What I am trying to do is to use the org.apache.commons.io.* classes. From
what I've known so far I need to add the appropriate package to my build
path. The problem is now that I do not have these packages! All I can find
is the folder "org.apache.commons.codec_1.3.0.v20070205-1728" in my
"c:\eclips\plugins" folder, which is obviously not the correct package.

How can I add this package? Do I have to manually download the packages
from the apache website? Do I have to manually unzip/tar them and then
rename them to somthing like "org.apache.commons.io"? Is there any better
way, for example by using the eclips built in "software updates -> find &
install" function?

I would appreciate any help, cause I am going nuts after searching for the
last two hours without any results :(

Thanks in advance

niko26
Re: Trying to use org.apache Packages [message #199628 is a reply to message #199618] Thu, 15 March 2007 09:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nugaee.SPAMtlen.pl

Niko26 wrote:
> How can I add this package? Do I have to manually download the packages
> from the apache website? Do I have to manually unzip/tar them and then
> rename them to somthing like "org.apache.commons.io"? Is there any
> better way, for example by using the eclips built in "software updates
> -> find & install" function?
>
> I would appreciate any help, cause I am going nuts after searching for
> the last two hours without any results :(
>
> Thanks in advance
>
> niko26
>
the easiest way is to download jar file for ...commons.io and place it
in lib folder in your project (or somewhere else) and then add to your
build path from project properties page using Add JARs... (or Add
external JARs... when jar is placed outside your workspace)

Additional steps are needed when you're building plugin

hope this helps
bartek michalik
Re: Trying to use org.apache Packages [message #199632 is a reply to message #199628] Thu, 15 March 2007 12:54 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: clay.gmx.at

Bartosz Michalik wrote:

> Niko26 wrote:
>> How can I add this package? Do I have to manually download the packages
>> from the apache website? Do I have to manually unzip/tar them and then
>> rename them to somthing like "org.apache.commons.io"? Is there any
>> better way, for example by using the eclips built in "software updates
>> -> find & install" function?
>>
>> I would appreciate any help, cause I am going nuts after searching for
>> the last two hours without any results :(
>>
>> Thanks in advance
>>
>> niko26
>>
> the easiest way is to download jar file for ...commons.io and place it
> in lib folder in your project (or somewhere else) and then add to your
> build path from project properties page using Add JARs... (or Add
> external JARs... when jar is placed outside your workspace)

So there is not halfway automated process to accomplish this? I have to
manually rename the packages to get a tidy, organized name like
"org.apache.commons.io"?

Is there any possibility to download all the org.apache.* packages in one
go and install it in one go rather than downloading each package manually?

Thanks for your help!

niko26
Re: Trying to use org.apache Packages [message #199642 is a reply to message #199632] Thu, 15 March 2007 13:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nugaee.SPAMtlen.pl

Niko26 wrote:
> Bartosz Michalik wrote:
> So there is not halfway automated process to accomplish this? I have to
> manually rename the packages to get a tidy, organized name like
> "org.apache.commons.io"?
> Is there any possibility to download all the org.apache.* packages in
> one go and install it in one go rather than downloading each package
> manually?

software updates works for a plugins, I assume you want to use apache
libraries in your project so there is no need to install it in eclipse.
I don't understand the renaming idea ... appropriate packages structure
is in your jar file. if you need source view of these classes you can:
http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse. jdt.doc.user/reference/ref-124.htm

if you want to modify these libs for your own purpose you can download
it into your workspace easily using eclipse cvs client.

best regards
bartek michalik
Re: Trying to use org.apache Packages [message #199650 is a reply to message #199632] Thu, 15 March 2007 13:54 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wegener.cboenospam.com

"Niko26" <clay@gmx.at> wrote in message
news:8bcef789a4959ee0660952bcab6c0067$1@www.eclipse.org...
> Bartosz Michalik wrote:
>
> > Niko26 wrote:
> >> How can I add this package? Do I have to manually download the packages
> >> from the apache website? Do I have to manually unzip/tar them and then
> >> rename them to somthing like "org.apache.commons.io"? Is there any
> >> better way, for example by using the eclips built in "software updates
> >> -> find & install" function?
> >>
> >> I would appreciate any help, cause I am going nuts after searching for
> >> the last two hours without any results :(
> >>
> >> Thanks in advance
> >>
> >> niko26
> >>
> > the easiest way is to download jar file for ...commons.io and place it
> > in lib folder in your project (or somewhere else) and then add to your
> > build path from project properties page using Add JARs... (or Add
> > external JARs... when jar is placed outside your workspace)
>
> So there is not halfway automated process to accomplish this? I have to
> manually rename the packages to get a tidy, organized name like
> "org.apache.commons.io"?
>
> Is there any possibility to download all the org.apache.* packages in one
> go and install it in one go rather than downloading each package manually?
>
> Thanks for your help!
>
> niko26
>
That is what a .jar file is. It is a collection of compiled Java classes
all packaged together with the correct package hierarchy in place. Download
the .jar file and place it somewhere in your project. Select the project
that will use the jar, right click, select Properties. Go to the Java Build
Path page and select the Libraries tab. Click the Add JARs button and
navigate to the .jar file in your project. You now have the classes in the
jar available to your project.
Re: Trying to use org.apache Packages [message #199655 is a reply to message #199618] Thu, 15 March 2007 14:04 Go to previous messageGo to next message
Charlie Kelly is currently offline Charlie KellyFriend
Messages: 276
Registered: July 2009
Senior Member
Hi Niko,

You can "create a plugin from existing jar archives":

1) Create a project that contains the jar files from Apache (and
Hibernate, and JBoss, and anything else that you want to reference)

2) Create a plugin project using wizard "create a plugin from existing
jar archives".

Have the java project, or plugin project, that you are working with
reference the new plugin that you created. This will permit you to
import from Apache.

At run time, ensure that the jars that you used to the create the plugin
are on the classpath.

Charlie



Niko26 wrote:
> Hi there,
>
> I am more or less a Java and eclipse newbie, so please bear with me :)
>
> What I am trying to do is to use the org.apache.commons.io.* classes.
> From what I've known so far I need to add the appropriate package to my
> build path. The problem is now that I do not have these packages! All I
> can find is the folder "org.apache.commons.codec_1.3.0.v20070205-1728"
> in my "c:\eclips\plugins" folder, which is obviously not the correct
> package.
>
> How can I add this package? Do I have to manually download the packages
> from the apache website? Do I have to manually unzip/tar them and then
> rename them to somthing like "org.apache.commons.io"? Is there any
> better way, for example by using the eclips built in "software updates
> -> find & install" function?
>
> I would appreciate any help, cause I am going nuts after searching for
> the last two hours without any results :(
>
> Thanks in advance
>
> niko26
>
Re: Trying to use org.apache Packages [message #199676 is a reply to message #199618] Thu, 15 March 2007 14:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse5.rizzoweb.com

Niko26 wrote:
> Hi there,
>
> I am more or less a Java and eclipse newbie, so please bear with me :)
>
> What I am trying to do is to use the org.apache.commons.io.* classes.
> From what I've known so far I need to add the appropriate package to my
> build path. The problem is now that I do not have these packages! All I
> can find is the folder "org.apache.commons.codec_1.3.0.v20070205-1728"
> in my "c:\eclips\plugins" folder, which is obviously not the correct
> package.
>
> How can I add this package? Do I have to manually download the packages
> from the apache website? Do I have to manually unzip/tar them and then
> rename them to somthing like "org.apache.commons.io"? Is there any
> better way, for example by using the eclips built in "software updates
> -> find & install" function?
>
> I would appreciate any help, cause I am going nuts after searching for
> the last two hours without any results :(

In addition to the advice you've already received, I strongly recommend
opening up the Eclipse Help Contents and navigate to the Java
Development User Guide > Getting Started section. There you will find
some tutorials on using Eclipse. Trying to use Eclipse for the first
time without doing the tutorials is going to waste a lot of your time -
do the tutorials and then you'll be in a much better understanding of
how to use the tool.

Hope this helps,
Eric
Re: Trying to use org.apache Packages [message #199682 is a reply to message #199655] Thu, 15 March 2007 14:34 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse5.rizzoweb.com

Charlie Kelly wrote:
> Hi Niko,
>
> You can "create a plugin from existing jar archives":
>
> 1) Create a project that contains the jar files from Apache (and
> Hibernate, and JBoss, and anything else that you want to reference)
>
> 2) Create a plugin project using wizard "create a plugin from existing
> jar archives".
>
> Have the java project, or plugin project, that you are working with
> reference the new plugin that you created. This will permit you to
> import from Apache.
>
> At run time, ensure that the jars that you used to the create the plugin
> are on the classpath.

There is no need to create a plugin project. It is quite sufficient to
either add the JARs to the project's build path or create a simple Java
project that contains the JARs and have the main project depend on that one.
Creating plugin projects will work, but is not the most direct route.
This is a newcomer group and I am discouraged to see people recommending
other than the most direct solution to simple problems.

Eric
Re: Trying to use org.apache Packages [message #199691 is a reply to message #199642] Thu, 15 March 2007 14:53 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: clay.gmx.at

Bartosz Michalik wrote:

>> Is there any possibility to download all the org.apache.* packages in
>> one go and install it in one go rather than downloading each package
>> manually?

> software updates works for a plugins, I assume you want to use apache
> libraries in your project so there is no need to install it in eclipse.

> I don't understand the renaming idea ...

What I mean is, right now I have following files/folders in my c:/eclipse
folder:

[...]
org.apache.commons.codec_1.3.0.v20070205-1728
org.apache.commons_logging_1.0.4.v200608011657
org.apache.derby.core_10.1.2.1
org.apache.jakarta_log4j_1.2.8.v200607172048
org.apache.lucene_1.4.103.v20060601
[...]
org.eclipse.wst.common.frameworks_1.1.3.v200702071605.jar
org.eclipse.wst.common.infopop_1.0.1.v200605270041.jar
org.eclipse.wst.common.modulecore_1.1.52.v200701251700.jar
org.eclipse.wst.common.project.facet.core_1.1.1.v20060811215 6.jar
org.eclipse.wst.common.project.facet.ui_1.1.2.v200701192142. jar
[...]

This is how it makes sense to me, everything is in a good logical
structure. Whereas if I download the "commons-io-1.3.1.zip", I will have
the folder

commons-io-1.3.1

in my plugins path. Instead I would like to have (if possible
automatically) a

org.apache.commons.io-1.3.1

folder or a jar file. Of course I could do this all manually... but thats
some taks I would expect my computer to do :)

> if you want to modify these libs for your own purpose you can download
> it into your workspace easily using eclipse cvs client.

With "these libs" are you referring to standard eclipse libs or also to
the apache libs?

Regards,


niko26
Re: Trying to use org.apache Packages [message #199782 is a reply to message #199691] Thu, 15 March 2007 21:18 Go to previous message
Eclipse UserFriend
Originally posted by: nugaee.SPAMtlen.pl

Niko26 wrote:
>
> This is how it makes sense to me, everything is in a good logical
> structure. Whereas if I download the "commons-io-1.3.1.zip", I will have
> the folder
>
> commons-io-1.3.1
>
> in my plugins path. Instead I would like to have (if possible
> automatically) a

it depends what you need these libs for. if you are developing java
project there is no need to put all your libs into eclipse/plugins
folder (and make them plugins).


> With "these libs" are you referring to standard eclipse libs or also to
> the apache libs?
apache, but in fact they use subversion system so if you want to connect
to the source repository from eclipse level you can use subversive or
subclipse plugins.

bartek michalik
Previous Topic:Dragging editor windows outside of main application
Next Topic:TreeViewer Adding items on expand Event
Goto Forum:
  


Current Time: Tue Apr 23 09:42:34 GMT 2024

Powered by FUDForum. Page generated in 0.10502 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top