Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

It is a bad practice to use Sun's proprietary Java classes?

Tags:

java

sun

The compiler display warnings if you use Sun's proprietary Java classes. I'm of the opinion that it's generally a bad idea to use these classes. I read this somewhere. However, aside from the warnings are there any fundamental reasons why you should not use them?

like image 430
JARC Avatar asked Dec 02 '09 18:12

JARC


1 Answers

Because they are internal APIs: they are subject to change in a undocumented or unsupported way and they are bound to a specific JRE/JDK (Sun in your case), limiting portability of your programs.

Try to avoid uses of such APIs, always prefer a public documented and specified class.

like image 77
dfa Avatar answered Sep 21 '22 15:09

dfa