code_junkie

How to write from java to the windows event log?

Nov 11th, 2011
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. String command = "eventcreate "
  2. + " /l APPLICATION"
  3. + " /so "" + applicationObjectName + """
  4. + " /t " + lvl
  5. + " /id " + id
  6. + " /d "" + description + """;
  7.  
  8. Runtime.getRuntime().exec(command);
Add Comment
Please, Sign In to add comment