Writing to the Windows Event Log in Java

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.
Who is Participating?
CEHJConnect With a Mentor Commented:
You need to use a special appender available in log4j, or better, logback

(Don't use the Runtime solution suggested at the link btw)
lizmarcAuthor Commented:
Looks like the Log4J option is the best one, based on all the feedback.  Thanks.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.