Solved

Writing to the Windows Event Log in Java

Posted on 2010-08-15
5
1,254 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 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

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…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Suggested Courses

751 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