Com.sun.java package

Hi,
What is the different between javax.swing and com.sun.java.swing package ? Are they the same ?
Where can I download com.sun.java.swing package ?
Regards,
Lim Boon Sun

The official Sun statement is that one should only use the classes listed in the APIs, i.e. javax.swing.*. Classes in packages such as com.sun.* contain version dependent implementations and are subject to change without notice. So, if you use them in your programs, it is very likely that your programs will not run under future (and previous) versions of the JRE.
So, just like the other fellow said, STICK TO THE javax.swing.* packages !

Similar Messages

  • Package com.sun.java.swing not found in import

    I'm trying to show graphic information but the swing package does not load up don't know what is going on Any help is welcome
    THIS IS THE LINE I GET WHEN I TRY TO IMPORT SWING
    Package com.sun.java.swing not found in import

    I'm trying to show graphic information but the swing
    package does not load up don't know what is going on
    Any help is welcome
    THIS IS THE LINE I GET WHEN I TRY TO IMPORT SWING
    Package com.sun.java.swing not found in importThat's an old package reference. Try javax.swing

  • JFrame Transperency  com.sun.awt package

    Hi,
    In my application i am having the requirement of tranperent window. I searched lot in google and i find transperent JFrame is possible. For making the JFrame transperent the **com.sun.awt** package is needed.
    But this package is unavailable in JDK1.6. I am also using JDK 1.6 version.
    If anyone knows the JDK containning this package. Please let me know that link(JDK containing com.sun.awt package).

    Don�t know if it help, but I found that 'org.apache.batik.svggen.SVGGraphics2D' substitutes 'com.sun.awt.svg.*'
    Also I found some info about com.sun.awt in here:
    http://java.sun.com/products/personaljava/spec-1-1/pJavaSpec.html

  • ResourceEntityResolver.java referencing com.sun.java.util.collection

    Im trying to compile the WL5.1 ResourceEntityResolver.java class but it is
    referencing com.sun.java.util.collection package. Where can I find this
    package?

    This can be an issue when using Tomcat and upgrading version of Mojarra.
    Tomcat will store a file with the extension of .ser in the work directory. This file contains the names of the ServletContextListener instances
    that need to be invoked when the application is next started. The problem is that if they use the values in that file and the listeners don't
    exist, they don't rescan the application to rebuild the .ser, they just fail.
    The way to fix this is to search for .ser files in your web container's work directory and the ones for the web application in question.

  • Jdk1.3.1 'com.sun.java.swing does not exist'???

    Thats what the compiler tells me, though it finds javac with no problem in the
    jdk1.3.1 lib directory. Any clue to what I'm missing here? Thanks nt

    Swing used to be in the com.sun.java.swing package in the very earliest releases, but now it is in the javax.swing package.

  • Report cannot be rendered (com/sun/java/util/collections/Iterator)

    Hello all
    I'm new both to Weblogic Server and BI Publisher.
    A few days ago I thought that I managed to install BI Publisher on top of Weblogic. It turns out to be untrue because I am not able to view any report, being it a sample or a newly created one.
    Platform: Windows 2003 32-bit
    Weblogic version: 10.3.3.0
    BI Publisher version: 10.1.3.4.1 (doesn't work both w/ and w/o the latest patchset 9791839)
    And now to the problem. Whenever I try to view a report, I get an error message stating "The report cannot be rendered because of an error, please contact the administrator". Being both the user and the administrator, I am forced to press the "Error Detail" link, upon which the only thing that pops below is "com/sun/java/util/collections/Iterator" (in red).
    The same non-verbose error message appears also when running in debug mode. Weblogic logs are empty from warnings, errors, etc.
    As for the Weblogic Server, it claims that the xmlpserver application has been deployed and started successfully.
    It seems to me that the BI Publisher application is trying to use java class that doesn't exist (com.sun.java.util.collections.Iterator). Of course I have no clue how to prove that because I do not have the source code for this app.
    Oracle support is hardly able to understand the problem, so I thought maybe one of you could give me some answer.
    Any Ideas?
    Jonathan

    By the way, I deployed the app under Oracle Report's cluster. Don't know whether it matters.

  • Class not found com/sun/java/util/collections/list

    hi
              i am trying to execute the following:
              java weblogic.jspc -d c:\weblogic\classes -keepgenerated
              printAllParameters
              and get the follwoing message:
              class not found com/sun/java/util/collections/list
              any suggestions?
              thanx
              

    Try it like this:
              java weblogic.jspc -d c:\weblogic\classes;c:\weblogic\lib\weblogicaux.jar ...
              Melrose Public Library <[email protected]> wrote:
              > hi
              > i am trying to execute the following:
              > java weblogic.jspc -d c:\weblogic\classes -keepgenerated
              > printAllParameters
              > and get the follwoing message:
              > class not found com/sun/java/util/collections/list
              > any suggestions?
              > thanx
              Dimitri
              

  • Cannot find JavaDoc for the com.sun.msv package

    Where can I find the JavaDoc for the com.sun.msv package ?

    What is the msv package? I also (after a quick google search) can't find any mention of this.
    What is the package for?

  • DOMNotSupportedException in com.sun.java.browser.dom.* classes

    I'd like to enable an applet to modify the DOM in a browser window directly (ie. by using org.w3c.dom.* stuff). I'm using the latest 1.5.
    I'm using a small class that I've pasted below to attempt to facilitate this. It evidently works in MSIE, where I receive the "Got document" message indicating a non-null value for 'page', but in Mozilla or Netscape, I get the following exception thrown:
    netscape.javascript.JSException
         at netscape.javascript.JSObject.getWindow(Unknown Source)
         at sun.plugin.dom.DOMServiceProvider.getDocument(Unknown Source)
         at sun.plugin.dom.DOMAccessor.getDocument(Unknown Source)
         at econ.ClientLink.run(ClientLink.java:35)
         at sun.plugin.dom.DOMService.invokeLater(Unknown Source)
         at econ.ClientLink.start(ClientLink.java:25)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    com.sun.java.browser.dom.DOMUnsupportedException
         at sun.plugin.dom.DOMServiceProvider.getDocument(Unknown Source)
         at sun.plugin.dom.DOMAccessor.getDocument(Unknown Source)
         at econ.ClientLink.run(ClientLink.java:35)
         at sun.plugin.dom.DOMService.invokeLater(Unknown Source)
         at econ.ClientLink.start(ClientLink.java:25)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Got document: null
    Is this just simply only supported for MSIE? This seems highly unlikely.
    I suspect it might have something to do with permissions in Mozilla, as these lines also appear in the log:
    liveconnect: the url of the applet is http://word and the permission is = false
    liveconnect: JavaScript: calling Java system code
    liveconnect: JavaScript: default security policy = http://word
    I haven't yet found anyone who could explain them. I'd like to try playing with permissions, buy I don't know how to do so. Any suggestions?
    --- code follows ---
    import javax.swing.*;
    import java.applet.*;
    import org.w3c.dom.*;
    import com.sun.java.browser.dom.*;
    public class ClientLink extends JApplet implements DOMAction {
    DOMService service;
    Document page;
    public void start() {
    try {
    service = DOMService.getService(this);
    System.out.println("Got service.");
    service.invokeLater(this);
    catch (Exception e) {
    e.printStackTrace();
    public Object run(DOMAccessor doma) {
    System.out.println("Entry successful.");
    try {
    page = doma.getDocument(this);
    System.out.println("Got document: "+page);
    catch (Exception e) {
    e.printStackTrace();
    System.out.println("Error: "+e.toString());
    return null;
    }

    A couple of things I've found with DOMService and/or LiveConnect and the more recent java and browser releases :
    1) You probably need to edit your java.policy file to grant permissions since the security in Java is now managed independently from the browser
    2) You need to remember to have mayscript="true" in your applet tag
    3) JSObject's dont work unless you've called JSObject.getWindow(...) first.
    4) Many legitimate java exceptions will appear misleadingly as security exceptions

  • Why can't I import the com.sun.javadoc package?

    I have JDK 1.6 but I don' think it's there...Any idea where I can find the com.sun.javadoc package?

    com.sun.javadoc is not part of the normal JSE API.
    It's part of some packages that come with the JDK that can be used to extend some JDK functionality.
    It's delivered in tools.jar inside your JDKs lib directory.

  • Com.sun.java.swing.*; ??

    I have notice these class references in a couple of sample programs.
    Do these come with every installation of the jre. I have 1.4 install
    and when i reference these library..I am told they don't exist..
    What are they ??
    Where do they come from ??
    How do I get them running in my apps.
    aj

    Anything in the
    sun.*
    and
    com.sun.*
    should not be used directly by you (unless the API's say so), yes the L&F's live in this name space, as does the native bits of Java and the basic implementations of stuff you can only get at via factorys but you still should not use them (unless you are going via the factory, and then you should never rely on it being the same between JREs).

  • Error "cannot access com.sun.java..."

    edit i mistyped in the topic name, i mean to say "com.sun.j3d..."
    I've set myself up using JCreator, installed j3d, j2sdk, and jdk. Tried a few test programs to make sure everything was working (a basic hello world and my chess game i created my junior year in highschool). It was all running fine.
    So i started reading into j3d tutorials, and came across the HelloUniverse sample program. I slapped the code in and compiled it, only to be met with:
    "cannot access com.sun.j3d.utils.applet.MainFrame".
    I commented out the import line that included this, compiled, and it gave me another message complaining about the same thing, only this time ending in:
    "...geometry.ColorCube"
    Obviously, its just running down the line with all of the j3d imports, so i ran through and reinstalled all my j3d files; still didnt work. I can't figure out what's wrong with it. Please help.
    Message was edited by:
    philjoh

    May be, it is not getting the class it is pointing to, in your classpath. Have u put jaxrpc-ri.jar in your classpath, since this jar contains ur class?
    Regards,
    - Tinu

  • Com.sun.java.swing package not found

    All my other programs compile fine if they're not using that package

    yea...wrong import....
    use
    import javax.swing.*;notice the X

  • New com.sun.mirror.* packages - annotation processing

    Hello,
    i would like to use annotation processing tool (APT), but there is much to learn yet.
    So, please help me.
    Let�s have an annotation that can be apllied to all code declarations (source code entities).I want to process some *.java files (their proper source code) via APT.From this code i wanna gain (in any way) those declarations (classes, ifaces, methods, constructors, etc.) that are annotated just with the only one annotation that i have.
    i was already going through the API, but not well-understood.
    As written, i created AnnotationProcessorFactory (just my annotation should be processed by this factory) with an appropriate AnnotationProcessor.
    I�ve already done some steps to succeed, but you know, that�s not that i want
    Of course, all is performed in build-time, after i call apt command with the option factory with the appropriate factory class
    Thank you a lot

    Hi,
    I am new to this forum and also just started
    working on apt can u plz tell me where do i get
    com.sun.mirror package and its sub-packages
    hanksIf you can use JDK 6, I strongly recommend using the standardized annotation processioning in javac and the packages javax.annotation.processing and javax.lang.model..* instead of apt and its com.sun.mirror.* API. To get started, take a look at
    sample/javac/processing/src/CheckNameProcessor.java
    under the JDK 6 install directory.
    If you just need to compile against the apt API, it is found in the tools.jar file in Sun's JDK; see http://java.sun.com/j2se/1.5.0/docs/guide/apt/GettingStarted.html
    You can find a jar file with just the API definition from https://aptmirrorapi.dev.java.net/.

  • Where to find the doc of package "com.sun.media.util"

    In the jmf.jar,it also has the com.sun.media package,but jmf20.pdf doc not include the comment,how to find the document of package com.sun.meida?

    why nobody answer the easy question for me?

Maybe you are looking for