Private APIs not usable in Java 9?
david.dehaven at oracle.com
Thu Apr 9 18:17:38 UTC 2015
You can see any com.sun.* usage by running "jdeps -v some.jar". You'll have to sort it all out manually, but it's all there.
> I'll second the recommendation to run jdeps on your apps. I note that it doesn't currently flag internal FX packages as internal. I filed the following RFE to address this:
> -- Kevin
> Chris Newland wrote:
>> I just asked about this on the adoption-discuss at openjdk.java.net list and
>> the answer from Martijn Verburg is:
>> Hi Chris,
>> I think the strong advice for those using private APIs is to run the jdeps
>> tool to see where they are using APIs that will go away / be moved. I'd
>> then get them to post that list to jigsaw-dev, I guess the root cause of
>> some of these issues should also be logged in JBS and fixed :-).
>> If you run $JAVA_HOME/bin/jdeps -jdkinternals <class dir or jar> then it
>> will show all uses of JDK private APIs that will go away in JDK9.
>> An example from one of my own projects:
>> chris at chris:~$ /home/chris/jdk1.8.0_40/bin/jdeps -jdkinternals
>> jitwatch-1.0.0-SNAPSHOT.jar -> /home/chris/jdk1.8.0_40/lib/tools.jar
>> -> com.sun.tools.javap.JavapTask JDK internal
>> API (tools.jar)
>> -> com.sun.tools.javap.JavapTask$BadArgs JDK internal
>> API (tools.jar)
>> Warning: JDK internal APIs are unsupported and private to JDK
>> implementation that are
>> subject to be removed or changed incompatibly and could break your
>> Please modify your code to eliminate dependency on any JDK internal APIs.
>> For the most recent update on JDK internal API replacements, please check:
>> I think sending these reports to jigsaw-dev at openjdk.java.net is a
>> worthwhile effort to help them direct resources for bug fixing and new
>> public APIs.
More information about the openjfx-dev