How to add jdom library into my jar file in eclipse

J

JTL.zheng

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
 
A

Andrew Thompson

JTL.zheng said:
I have used jdom in my codes ...

This one? said:
...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
 
J

JT

JTL.zheng said:
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.
 
A

Andrew Thompson

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.
 
J

JT

Andrew said:
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.
 
L

Lew

Andrew said:
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.
 
J

JT

Lew said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top