?
Solved

Writing to the Windows Event Log in Java

Posted on 2010-08-15
5
Medium Priority
?
1,262 Views
Last Modified: 2012-05-10
I am designing a Java based utility which will run only on Windows servers.  Our corporate Support tool is, I'm told, really good at monitoring the Windows Event Log and I was asked that if possible, I have this Java utility write to the event log in case of errors, and indeed, completely as a good log that is monitored.  However, given this is Java which doesn't know about Windows as such, I'm wondering whether there is a reasonably simple and straightforward way to write to the Windows Event Log from a Java program.  Kind of defeats the purpose of Java really but I was asked to look into it.  Thanks.
0
Comment
Question by:lizmarc
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 1336 total points
ID: 33443617
You need to use a special appender available in log4j, or better, logback
0
 
LVL 86

Assisted Solution

by:CEHJ
CEHJ earned 1336 total points
ID: 33443630
0
 
LVL 92

Assisted Solution

by:objects
objects earned 664 total points
ID: 33443632
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 33443733
:-)

(Don't use the Runtime solution suggested at the link btw)
0
 

Author Comment

by:lizmarc
ID: 33443763
Looks like the Log4J option is the best one, based on all the feedback.  Thanks.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Suggested Courses

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question