Reputation: 12484
I'm having alot of trouble setting up log4J on windows. I am reading the online how-to but it's not really clicking:
So this is how I set my System Variable:
The full var. value is :
C:\apache-log4j-2.0-beta4-bin\org\apache\logging\log4j\core
And then I add the LOG4J_HOME variable tothe PATH variable.
But I still get errors when compiling. Does anybody have pointers on this? Thank You Very Much
Upvotes: 1
Views: 1216
Reputation: 129
As far as I know, you probably have to add string ";C:\apache-log4j-2.0-beta4-bin\org\apache\logging\log4j\core" to the tail of windows's system variable 'CLASS_PATH'. If you can't found 'CLASS_PATH' in your system variables list, then you have to add it. After this, log out your windows account and log in. It should work.
Upvotes: 1
Reputation: 36834
Let's see, you have unzipped the apache-log4j-2.0-beta4-bin.zip to C:\ drive. This gives you a whole bunch of jar files in that directory. You don't need to unzip these jar files.
Instead, when you compile your java program, you add some of these jar files to the classpath. You probably only need to add
These two jar files are usually enough. The other jar files are helpers for special cases. Some cannot be used together, so don't just add all of them!
The details of how to add these jar files to the classpath when compiling depends on what you are using to compile.
By the way, log4j 2.0 beta5 was released recently with some new features and lots of bugfixes.
Upvotes: 1