Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to add jdom library into my jar file in eclipse

1 view
Skip to first unread message

JTL.zheng

unread,
Jul 5, 2007, 10:38:40 PM7/5/07
to
I have used jdom in my codes
so I must add the jdom library into my jar file to make it run
but I can't find any step to add jdom library in eclipse:File-Export-
Java-JAR file
how can I jdom library into my jar file in eclipse?

Thank you very much in advance

Andrew Thompson

unread,
Jul 6, 2007, 3:37:44 AM7/6/07
to
JTL.zheng wrote:
>I have used jdom in my codes ...

This one? <http://www.jdom.org/>

>...so I must add the jdom library into my jar file ...

Must you? Is that what the JDOM documentation
says? That sounds very unusual.

Usually a library/API is distributed as .jar files,
and the way to use them is to ensure that they
are available on the application's *classpath* at
compile and (for deployment) runtime.

There are a number of ways to do that, for
deployment. One is to put the other jar's in
a path 'known to the application jar' (same
directory is easiest) and specify them in the
main jar's manifest file. Another way that I
have more experience with, is to deploy using
web start, and simply list the other jar's as
resources in the JNLP launch file.

..


>how can I jdom library into my jar file in eclipse?

I don't provide support for eclipse. You
might try the eclipse forums, for that.

--
Andrew Thompson
http://www.athompson.info/andrew/

Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.aspx/java-general/200707/1

JT

unread,
Jul 7, 2007, 8:59:09 AM7/7/07
to
JTL.zheng wrote:

> how can I jdom library into my jar file in eclipse?

Let me see if I can help you out.

I have a project called "testing"
I want to add the jdom library to it.
On my machine (Ubuntu Feisty Fawn server) I have the jdom framework
stored in
/usr/local/jdom-1.0

Now if I right click on my project then select
Build Path and then Configure Build Path, I'll select the
Libraries tab then "Add External Jars"
Then I navigate to the /usr/local/jdom-1.0/build directory
and select the jdom.jar file
Then just "Ok" your way back out and you're done.
jdom.jar is now on your project build path.


PS- See if you can start posting in plain text. Some people will get
annoyed by posting in html because not all news readers can handle it.

Andrew Thompson

unread,
Jul 7, 2007, 9:31:08 PM7/7/07
to
JT wrote:
..

>PS- See if you can start posting in plain text. Some people will get
>annoyed by posting in html ..

What HTML formatting? I can see no sign of it in
either my current web interface to usenet (see sig.),
nor the 'view source' mode of GG.
<http://groups.google.com/group/comp.lang.java.programmer/msg/bd235e567f5292d2?dmode=source
>
.in fact, that bit..
Content-Type: text/plain; charset="gb2312"
.strongly indicates to me that it was always
intended as 'text'.

>..because not all news readers can handle it.

HTML formatting in usenet posts is quite annoying,
but I /think/ you misjudged this post.

Message posted via http://www.javakb.com

JT

unread,
Jul 7, 2007, 10:04:23 PM7/7/07
to
Andrew Thompson wrote:
> HTML formatting in usenet posts is quite annoying,
> but I /think/ you misjudged this post.
Fine, my bad. I didn't check the headers. To the OP, I hope you were
able to use at least one piece of my feeble attempt to help. I don't
"support" eclipse, but I've had the exact same problem before and that's
what I did to make it work. Others may have better ideas, and that's
fine as well.


Lew

unread,
Jul 8, 2007, 8:59:40 AM7/8/07
to
JT wrote:
>> PS- See if you can start posting in plain text. Some people will get
>> annoyed by posting in html ..

Andrew Thompson wrote:
> What HTML formatting? I can see no sign of it in
> either my current web interface to usenet (see sig.),
> nor the 'view source' mode of GG.
> <http://groups.google.com/group/comp.lang.java.programmer/msg/bd235e567f5292d2?dmode=source
> .in fact, that bit..
> Content-Type: text/plain; charset="gb2312"
> .strongly indicates to me that it was always
> intended as 'text'.

...


> HTML formatting in usenet posts is quite annoying,
> but I /think/ you misjudged this post.

Some news clients, such as Thunderbird on Linux (Fedora Core 7) in my case,
use a different font for each different character encoding. I tell
Thunderbird to figure everything is UTF-8, but when it isn't (e.g., "gb2312")
then it (or the OS, not sure which) picks a different font from usual. I used
to think it was HTML abuse, too, until the headers convinced me otherwise.

--
Lew

JT

unread,
Jul 8, 2007, 9:58:22 AM7/8/07
to
Lew wrote:

> Some news clients, such as Thunderbird on Linux (Fedora Core 7) in my
> case, use a different font for each different character encoding. I
> tell Thunderbird to figure everything is UTF-8, but when it isn't (e.g.,
> "gb2312") then it (or the OS, not sure which) picks a different font
> from usual. I used to think it was HTML abuse, too, until the headers
> convinced me otherwise.
>

Ahhh, the joys of technology. Who'd a thunk it.

0 new messages