Solved

Writing to the Windows Event Log in Java

Posted on 2010-08-15
5
1,244 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
  • 3
5 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 334 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 334 total points
ID: 33443630
0
 
LVL 92

Assisted Solution

by:objects
objects earned 166 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now