Reputation:
Are the Oracle Java and OpenJDK implementations for com.sun.net.httpserver
fully compatibile? Should I expect some problems when I develop on Oracle Java, but ship for OpenJDK (docker)?
Eclipse warns me for using 'restricted' package, which makes me some worries, however, Eclipse's warnings are flawed in many domains (maven the most prominent one from my daily life).
Is there a good reason as for current stand (Java 8) for discouraging using of this package in first line? If there is, is it relevant for Oracle vs. OpenJDK or they are fully compatibile for that package?
Upvotes: 5
Views: 2707
Reputation: 665
That package is part of an exported, JDK-specific API, per https://docs.oracle.com/javase/9/docs/api/jdk.httpserver-summary.html . Exported means you can use it. JDK-specific means it's in both OpenJDK and Oracle JDK, but doesn't necessarily have to be in every implementation. Please see http://openjdk.java.net/jeps/179 for details.
Upvotes: 6