-
Bug
-
Resolution: Won't Fix
-
P3
-
9, 10, 11
ADDITIONAL SYSTEM INFORMATION :
OS: Windows 7 64 bit.
Java version: 10.0.1
A DESCRIPTION OF THE PROBLEM :
Currently, JDK 10.0.1 allows to make use of the below listed internal APIs with a warning message like "warning: UnicastRef is internal proprietary API and may be removed in a future release."
1) sun.rmi.server.UnicastRef
2) sun.rmi.server.UnicastRef2
3) sun.rmi.transport.Endpoint
4) sun.rmi.transport.LiveRef
5) sun.rmi.transport.tcp.TCPEndpoint
The question is that, Is Oracle going to provide an alternate solution/classes for the above listed internal APIs, If the above internal APIs are going to be removed?
The internal APIs listed above have been used in an application developed 15+ years back. Now, the aim is to migrate the application from JDK 8 u171 to JDK 11.
REGRESSION : Last worked in version 8u172
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Step 1) Write a below java code:
import sun.rmi.server.UnicastRef;
import sun.rmi.server.UnicastRef2;
import sun.rmi.transport.Endpoint ;
import sun.rmi.transport.LiveRef ;
import sun.rmi.transport.tcp.TCPEndpoint;
public class HelloWorld {
}
Step 2) compile the java code using JDK 10.0.1 as below:
javac --add-exports java.rmi/sun.rmi.server=ALL-UNNAMED --add-exports java.rmi/sun.rmi.transport=ALL-UNNAMED --add-exports java.rmi/sun.rmi.transport.tcp=ALL-UNNAMED HelloWorld.java
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
java code should compile without any warning message like "warning: UnicastRef is internal proprietary API and may be removed in a future release".
ACTUAL -
warning: UnicastRef is internal proprietary API and may be removed in a future release.
CUSTOMER SUBMITTED WORKAROUND :
Make use of "--add-exports" command to export sun.rmi.server package during compilation.
command:
javac --add-exports java.rmi/sun.rmi.server=ALL-UNNAMED --add-exports java.rmi/sun.rmi.transport=ALL-UNNAMED --add-exports java.rmi/sun.rmi.transport.tcp=ALL-UNNAMED HelloWorld.java
FREQUENCY : always
OS: Windows 7 64 bit.
Java version: 10.0.1
A DESCRIPTION OF THE PROBLEM :
Currently, JDK 10.0.1 allows to make use of the below listed internal APIs with a warning message like "warning: UnicastRef is internal proprietary API and may be removed in a future release."
1) sun.rmi.server.UnicastRef
2) sun.rmi.server.UnicastRef2
3) sun.rmi.transport.Endpoint
4) sun.rmi.transport.LiveRef
5) sun.rmi.transport.tcp.TCPEndpoint
The question is that, Is Oracle going to provide an alternate solution/classes for the above listed internal APIs, If the above internal APIs are going to be removed?
The internal APIs listed above have been used in an application developed 15+ years back. Now, the aim is to migrate the application from JDK 8 u171 to JDK 11.
REGRESSION : Last worked in version 8u172
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Step 1) Write a below java code:
import sun.rmi.server.UnicastRef;
import sun.rmi.server.UnicastRef2;
import sun.rmi.transport.Endpoint ;
import sun.rmi.transport.LiveRef ;
import sun.rmi.transport.tcp.TCPEndpoint;
public class HelloWorld {
}
Step 2) compile the java code using JDK 10.0.1 as below:
javac --add-exports java.rmi/sun.rmi.server=ALL-UNNAMED --add-exports java.rmi/sun.rmi.transport=ALL-UNNAMED --add-exports java.rmi/sun.rmi.transport.tcp=ALL-UNNAMED HelloWorld.java
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
java code should compile without any warning message like "warning: UnicastRef is internal proprietary API and may be removed in a future release".
ACTUAL -
warning: UnicastRef is internal proprietary API and may be removed in a future release.
CUSTOMER SUBMITTED WORKAROUND :
Make use of "--add-exports" command to export sun.rmi.server package during compilation.
command:
javac --add-exports java.rmi/sun.rmi.server=ALL-UNNAMED --add-exports java.rmi/sun.rmi.transport=ALL-UNNAMED --add-exports java.rmi/sun.rmi.transport.tcp=ALL-UNNAMED HelloWorld.java
FREQUENCY : always