Skip to main content



      Home
Home » Newcomers » Newcomers » import org.jdom?(Imported jar but class still not recognized)
import org.jdom? [message #896265] Tue, 17 July 2012 15:23 Go to next message
Eclipse UserFriend
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 16:51 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: import org.jdom? [message #896308 is a reply to message #896281] Tue, 17 July 2012 21:17 Go to previous messageGo to next message
Eclipse UserFriend
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 09:58 Go to previous messageGo to next message
Eclipse UserFriend
-_-' I was importing org.jdom but my jar was jdom2.

[Updated on: Wed, 18 July 2012 10:37] by Moderator

Re: import org.jdom? [message #896497 is a reply to message #896486] Wed, 18 July 2012 10:18 Go to previous message
Eclipse UserFriend
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: Wed Jul 23 08:22:55 EDT 2025

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

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

Back to the top