I was trying to improve logging of my HTTP connections by using the built-in java.util.logging features. But after inserting a line to activate the logging in the code, i'm getting an error in my ant build that i do not understand.
error: package sun.util.logging does not exist
import sun.util.logging.PlatformLogger;
^
sun.util.logging.PlatformLogger
is located in rt.jar which should always be on the classpath as far as i know. And it's not an "internal API" that would throw a warning during compilation. The code works fine in Eclipse.
Ant is running on JDK 1.8.0_60 as is my Eclipse project. I expect it to use the rt.jar from that installation. Why can it not access some select classes? Or am i looking at the wrong set of core classes and the javac task is using a different rt.jar?
Sidenote: i know that i can use logging properties to set it up. That's not the point of this question. I want to know why ant is having a problem that Eclipse doesn't.