Came accross this the other day when a coworker used sun.misc.Base64Decoder, something didn't feel right about the package name, but I had no justification on why he shouldn't use it. After a bit of searching I found the following link:
Sun Packages FAQ
The java.*, javax.* and org.* packages documented in the Java 2 Platform Standard Edition API Specification make up the official, supported, public interface.
If a Java program directly calls only API in these packages, it will operate on all Java-compatible platforms, regardless of the underlying OS platform.
The sun.* packages are not part of the supported, public interface.
A Java program that directly calls into sun.* packages is not guaranteed to work on all Java-compatible platforms. In fact, such a program is not guaranteed to work even in future versions on the same platform.
Makes obvious sense now, but it was actually something I was not aware of.
Thursday, August 2, 2012
Subscribe to: Post Comments (Atom)
I have recently been slacking on content on my blog, between long stressful hours at work and to the wonderful toy that is an iPhone, I have...
I make no claim to be a "computer scientist" or a software "engineer", those titles alone can spark some debate, I regar...
I saw an article (well more of a rant) the other day, by Rob Williams Brain Drain in enterprise Dev . I have to say, I do agree with some o...
This series of posts will be about me getting to grips with JBoss Drools . The reasoning behind it is: SAP bought out my company's curre...
I recently finished 97 Things every programmer should know . Well to be completely honest I did skim over a couple of the 97, but all and al...
Checkstyle verwenden! Warnung bei sun.* Packages ist Standard für den IllegalImport Check (http://checkstyle.sourceforge.net/config_imports.html). Man kann Checkstyle Konfigurationen in die IDE laden oder z.B. in Maven Builds als Plugin integrieren. Noch komfortabler wird es mit Sonar (http://www.sonarsource.org/). Auch gleich mit Findbug kombinieren, damit andere typische Programmierfehler erkannt werden.ReplyDelete
Ok, my german isnt great, but I do get Checkstyle & Sonar, config, IDE, warning, illegalimport :)ReplyDelete
Yes we do use checkstyle (probably the reason I had not run into the issue before), it just happened that this bit of code wasn't in our standard maven / code setup yet.
I have seen Java with many packages which helpful in developing application.but i don't know more about sun.*.I just came to know from your site.ReplyDelete
Many interesting information I can find what I am very happy.ReplyDelete
before you can choose whether or not you want to change your existing car speakers and if you want to attach them to amplifiers to get the best sound quality, the easiest thing to do is to read a little more about the car door speakers themselves.ReplyDelete
Liên hệ Aivivu, đặt vé máy bay tham khảoReplyDelete
săn vé máy bay giá rẻ đi Mỹ
chuyến bay từ mỹ về việt nam covid
đăng ký bay từ canada về Việt Nam
từ nhật bản về việt nam bao nhiêu tiếng
Lịch bay từ Hàn Quốc về Việt Nam hôm nay
Vé máy bay từ Đài Loan về VN
chuyen bay chuyen gia ve viet nam