Home > Java > javaTutorial > Should You Avoid Sun's Proprietary Java Classes?

Should You Avoid Sun's Proprietary Java Classes?

Linda Hamilton
Release: 2024-12-04 11:58:11
Original
980 people have browsed it

Should You Avoid Sun's Proprietary Java Classes?

Should Sun's Proprietary Java Classes Be Avoided?

When using Sun's proprietary Java classes, you may encounter compiler warnings. This raises concerns about the practice of relying on these classes. Beyond the warnings, are there fundamental reasons for avoiding their use?

Reasons to Avoid Sun's Proprietary Classes:

  • Internal APIs: These classes are part of Sun's internal implementation and are not officially documented or supported.
  • Undocumented Changes: They may undergo undocumented changes, breaking your code's behavior.
  • Unsupported: Sun does not provide support for these classes, so you cannot rely on their stability or functionality.
  • Portability Limitations: Their use ties your code to a specific Sun JRE/JDK, limiting its portability to other environments.

Recommendation:

It is generally advisable to avoid using Sun's proprietary classes. Instead, opt for classes that are publicly documented and supported. This ensures the reliability, portability, and future compatibility of your code.

The above is the detailed content of Should You Avoid Sun's Proprietary Java Classes?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template