Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Does anyone know how I can configure LogManager to use my own handler?

configure handler
0
10 Posted

Does anyone know how I can configure LogManager to use my own handler?

0
10

The oracle speaks: Instead of passing on all properties to the Java runtime (that is, java.exe) with say -Dproperty=value Web Start sets all properties in the JNLPClassLoader after the Java runtime is up and running (but before your app gets loaded). The rationale is that allowing setting of arbitrary Java runtime properties is unsecure. Web Start only supports a hand-picked selection of properties considered “safe” for pass-through to the Java runtime command line (e.g. sun.java2d.noddraw). The logging properties are not yet part of this elite circle. Lobby Sun for membership. Your second attempt fails because of a LogManager restriction: “Note that all classes loaded during LogManager configuration must be on the system class path. That includes the LogManager class, any config classes, and any handler classes.” As a work around package your logging classes in a separate jar and roll a Web Start extension installer to install your logging jar in the Java runtime’s lib/ext directory.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123