I call javac from my ant script like this:
Recommendation: Don't ignore your compiler's warnings. The warnings are there for a reason. My company's legacy codebase is moving towards a "treat warnings as errors and fail the build" model as we can expend the effort to fix warnings produced during our compile cycle.
In your case, the warning is:
warning: sun.reflect.Reflection is Sun proprietary API and may be removed in a future release
It has always been a warning to not import from sun
packages as long as I can remember, because they're a non-public API. There's even a FAQ about it on the official Oracle Java site.
You haven't posted your actual code, so it's hard to provide further recommendations...What are you using in sun.reflect.Reflection
that you couldn't also do through something in java.lang.reflect
?