Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » import org.jdom?(Imported jar but class still not recognized)
import org.jdom? [message #896265] Tue, 17 July 2012 19:23 Go to next message
anijdap ykus is currently offline anijdap ykusFriend
Messages: 4
Registered: July 2012
Junior Member
Hi,

I am trying to modify xml files and figured jdom is needed.

I am using my laptop.
I have imported jdom-2.0.0.jar to my project's library, but I the classes aren't yet recognized. When I type "org." on the lab's computer, it gives me suggestions, but not on my laptop. I figured I need org jars?.. I am not sure if this is right. If so, could you please hint me on how to get that? If not.. just shoot me some advice.

Thanks,

The Noob
Re: import org.jdom? [message #896281 is a reply to message #896265] Tue, 17 July 2012 20:51 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

On 7/17/2012 3:23 PM, padina suky wrote:
> I am trying to modify xml files and figured jdom is needed.
>
> I am using my laptop.
> I have imported jdom-2.0.0.jar to my project's library, but I the
> classes aren't yet recognized. When I type "org." on the lab's computer,
> it gives me suggestions, but not on my laptop. I figured I need org
> jars?.. I am not sure if this is right. If so, could you please hint me
> on how to get that? If not.. just shoot me some advice.

Putting the .jar file in the project isn't enough, it has to be added to
the project's Java Build Path as well. In the Package Explorer or
Project Explorer view, you can do so easily from the .jar file's context
menu.

--
---
Nitin Dahyabhai
Eclipse WTP Source Editing and JSDT
IBM Rational


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: import org.jdom? [message #896308 is a reply to message #896281] Wed, 18 July 2012 01:17 Go to previous messageGo to next message
anijdap ykus is currently offline anijdap ykusFriend
Messages: 4
Registered: July 2012
Junior Member
Thank you. Could you be a bit more clear on how this is done?
Re: import org.jdom? [message #896486 is a reply to message #896308] Wed, 18 July 2012 13:58 Go to previous messageGo to next message
anijdap ykus is currently offline anijdap ykusFriend
Messages: 4
Registered: July 2012
Junior Member
-_-' I was importing org.jdom but my jar was jdom2.

[Updated on: Wed, 18 July 2012 14:37]

Report message to a moderator

Re: import org.jdom? [message #896497 is a reply to message #896486] Wed, 18 July 2012 14:18 Go to previous message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 7/18/2012 7:58 AM, padina suky wrote:
> By that do you mean that I have to build path from my project? If so
> that what I did. If not.. I am not sure what the jar file's context menu
> is..

Padina,

You can ensure the JAR is in the classpath either by

1. right-clicking the JAR in the project and choosing to add it (what
Nitin means by context menu)

or by

2. right-clicking the project, choosing Build Path -> Configure Build
Path -> Libraries, then adding the JAR by hand (you'll have to navigate
your filesystem to find it).
Previous Topic:err msg re: SkeletonTreeContentProvider??
Next Topic:add element to xml
Goto Forum:
  


Current Time: Thu Apr 18 08:12:39 GMT 2024

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

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

Back to the top