For the record, checking on JDK 9 sources - com.sun.* packages still exist and even this the classes in question are still in place. So the issue likely is that you are not eligible to use com.sun.* in your app.