Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » installed log4j plugin, but...
installed log4j plugin, but... [message #62470] Tue, 10 May 2005 20:43 Go to next message
Al Mising name is currently offline Al Mising nameFriend
Messages: 123
Registered: July 2009
Senior Member
I've installed the log4j plugin (ie unzipped and placed in plugin
directory)
but on this line of code:
import org.apache.log4j.Logger;

i get the error that org.apache.log4j cannot be resolved.
What else do I need to do?
Re: installed log4j plugin, but... [message #62547 is a reply to message #62470] Wed, 11 May 2005 03:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: news0reader.hotmail.com

If you simply want to use log4J, use it as you would any ordinary jar. As
follows:

1) place it in any folder on your machine
2) in Eclipse, click on your project in Package Explorer
3) select menubar Project/Properties
4) select Java Build path on the left
5) select Libraries on the right
6) use the "Add External jars" button to add your jar to the project

What you've done is made your project aware of the log4J jar.

It's probably not a good idea to place jars willy-nilly into the plugins
folder. This folder is meant specifically for Eclipse plugins, not generic
jars.

regards,

--A

"al" <allelopath@hotmail.com> wrote in message
news:236bdf6b97ec23a1fa2b0a5b9819a809$1@www.eclipse.org...
>
> I've installed the log4j plugin (ie unzipped and placed in plugin
> directory)
> but on this line of code:
> import org.apache.log4j.Logger;
>
> i get the error that org.apache.log4j cannot be resolved.
> What else do I need to do?
>
>
Re: installed log4j plugin, but... [message #62665 is a reply to message #62547] Wed, 11 May 2005 13:27 Go to previous messageGo to next message
Al Mising name is currently offline Al Mising nameFriend
Messages: 123
Registered: July 2009
Senior Member
Thanks for your reply.
I had tried your suggestion before i posted this and that didn't work.
After adding the external jar, i could cleary see it (and the various
directoy paths to classes) in the project, and could see that these
matched the import in the code, but it still gave the same error.
Re: installed log4j plugin, but... [message #63230 is a reply to message #62665] Thu, 12 May 2005 06:27 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: aronbock.hotmail.com

Just as a sanity check, please verify that the log4J jar does, in fact, have
the class you're looking for. You may do this simply by opening the jar
with a zip program (WinZip, 7-zip, etc), and visually verifying that the
class is present.

Regards,

--A

"al" <allelopath@hotmail.com> wrote in message
news:1d89f78e7c2a934e47ec3a8340aeb9d4$1@www.eclipse.org...
> Thanks for your reply.
> I had tried your suggestion before i posted this and that didn't work.
> After adding the external jar, i could cleary see it (and the various
> directoy paths to classes) in the project, and could see that these
> matched the import in the code, but it still gave the same error.
>
Re: installed log4j plugin, but... [message #67090 is a reply to message #63230] Fri, 20 May 2005 14:58 Go to previous message
Eclipse UserFriend
Originally posted by: vikram.krislon.net

Hi,
Also try this, fi you a remaking an plugin
1.in the Runtime tab of the plugin.xml add the specific jar.
2. make sure the jar is pasted in the same plugin and the main folder of
the plugin.i.e it is not inside teh src or the bin or some other folder..
3. if using 3.0 version on the project right click and select PDE Tools
and the Update Classpath.
the icon for the jar should change to a "jar" icon as in a cookie jar.
If this happens this means that your jar is now on the classpath of your
project.


now you should be able to reference the required class and as aron says
,verify the jar actually contains the class.
Previous Topic:.metadata
Next Topic:running esclipse
Goto Forum:
  


Current Time: Thu Jul 18 19:25:12 GMT 2024

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

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

Back to the top