Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6953899
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:32:13+00:00 2026-05-27T14:32:13+00:00

Like javax contains the extensions, what is the com.sun package supposed to contain?

  • 0

Like javax contains the extensions, what is the com.sun package supposed to contain?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T14:32:14+00:00Added an answer on May 27, 2026 at 2:32 pm

    It contains Sun Oracle reference implementations of the standard Java (EE) APIs. Among others Mojarra (the reference JSF implementation of Oracle) and Glassfish (the reference Java EE implementation of Oracle) use this package. It’s preferable to not use those classes directly in your code as it would make your code tight coupled to the implementation. Coding against the java(x) API directly enables you to change the implementation without changing your code (e.g. MyFaces instead of Mojarra and JBoss AS instead of Glassfish). Also JDK’s own HttpServer sits in the com.sun.* package, see Simple HTTP server in Java using only Java SE API.

    Please note that the com.sun.* package should not be confused with sun.* package which are the internal classes behind Oracle JRE which you should absolutely not import/use in your code as it would make your code tight coupled to the JRE make/version. Not using sun.* package at all enables you to run your code on all other JRE implementations (OpenJDK, GCJ, etc).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can i check whether a package like javax.servlet.* exists or not in my
I developed a java web application which contains Wallpapers, there is like button for
I try run jconsole with jar that contains my classes like: cd C:\Program Files\Java\jdk1.6.0_26\bin
I'm using the javax.xml.transform.Transformer class to perform some XSLT translations, like so: TransformerFactory factory
I have 2 modules: BrowserLibrary and BrowserViewer. Browser contains gui like any browser should.
I have 2 JPanels in a frame. The first panel contains java items like
I have a page url, which looks like: http://mydomain.com/nodes/32/article/new?return=view After installing tomcat 7, when
I have written a custom component for jsf. The renderer extends com.sun.faces.renderkit.html_basic.ListboxRenderer. My component
I have a javax.servlet.Filter class that I would like to redirect urls. The problem
When running the packaged app like java -jar my-app-0.0.1-SNAPSHOT-jar-with-dependencies.jar, I get the following error:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.