Difference between having "com.sun" prefix

i'm new to java and i was just wondering what is the difference or effect of having the prefix "com.sun" at any of the import package files? like "com.sun.javax.swing.*;" for example...

dinawanao wrote:
what does "com.sun" mean? what is it?It's just part of a package name. You can name packages whatever you want. Sun's suggestion, and the generally accepted convention, is to begin your package names with your domain name in reverse order. So if I'm working jverd.com, and I'm creating a statistics package, I'd call it com.jverd.statistics. Similarly, a package name that starts with com.sun just means that package came from sun.com. Classes in the core API that start with com.sun are not intended for public use, and could change or go away with any release.
The main exception to the naming convention is that package that are part of the core Java API and that are intended for general use start with java or javax, where just plain java means it's "really, really core," and javax means it's an "extension" that was added on later. Some stuff has moved from javax to java I think, and there's more (like Swing) that is now probably "core" enough that it could move, but I don't think they want to break compatibility. So for all intents and purposes, java and javax more or less mean the same thing--part of the JSE API.
Again, the name itself means nothing at all to Java. One package name is the same as any other. With one exception.
All classes in the java.lang package are automatically imported. This means that you don't have to use an import statement to refer to them by their simple class name (as opposed to the fully qualified name).
So, to your original question, I would be surprised if there is in fact com.sun.javax.swing. However, if there is, the following are true: 1) That package name means nothing special to Java, and 2) You should not be referring to it in your code.

Similar Messages

  • What's the difference between MSJVM and SUN JVM

    Sometimes I can run a program under MSJVM more stable (faster) than that under SUN JVM. Would you please tell me why or tell some difference between them?? Many thanks.
    Edited by: ericfok on Dec 5, 2008 8:48 AM

    vitallis wrote:
    MSJVM has JNI ver. 1.1. My JNI wrapper generator also supports it. I wrote JNI code for MSJVM in 2000.No you didn't.
    You either used the MS VM linkage format, which resembles (strongly) how C# does it or you were not using the MS VM but rather the Sun one.
    The fact that MS Java supported third party dlls does not make it JNI. JNI was a specific specification on exactly how such support would be provided. And MS Java did not have it.
    References, search for "microsoft"
    [http://www.javaworld.com/javaworld/jw-10-1999/jw-10-jni.html]
    The following from Microsoft itself asserting that JNI cannot be required part of java. Search for "JNI". Presumably if MS was claiming that it wasn't required then obviously they knew that it wasn't in fact in there.
    [http://www.microsoft.com/presspass/legal/10-21copyright.mspx]

  • I am wanting to buy and Ipad.. but I would like to know the difference between having wifi and a simcard..if someone could explain this to me.. and the benefits of both I would appreciate it.

    Good Morning:
    I have been looking at the Ipads for a while now.  I have some concerns though.  First, I am NOT a techy of any kind!!  So my question is;  What is the difference between wifi and a simcard(?)   What I understand about wifi is...if you are in an area with free internet.. you can excess it.  If not, then you can't.  What is a simcard?  Is this what you would use like a turbo stick..such as internet on the go... or is this a data plan for the Ipad, like I have for my phone?  If so, I take it that it would mean a monthly bill of what or however I set it up...  Please be kind with your responces.. I am a older person who wants a new gadget.   
    Thank you

    Hi, Sarah,
    You don't really compare a SIM card directly with WiFi. What a SIM card indicates is that a device is designed to connect to cellphone service, in the case of an iPad a data-only service for connection to the Internet. The SIM card works with a technology called GSM (don't worry about what that means); the SIM card is just how the iPad is identified to the cell carrier (in the US, that would be AT&T).
    Your choices of connecting an iPad to the Internet are therefore:
    WiFi - wireless network connection which uses a device referred to as a "hotspot" or "access point" (and sometimes a "wireless router") with an Internet service provided by some other company. You may have this at home, with your own WiFi router and Internet service, or it may be found by some other location, such as a coffee shop. Cost of WiFi at home would only be the cost of the router and the fee you pay to your Internet provider. Other locations may or many not involve a cost. The advantage of a WiFi connection is speed (compared to a cellular data service) and cost (no monthly fee other than your Internet provider).  The disadvantage is that you have to be in range of a WiFi service; that range is usually on the order of 100 feet or so.
    Cellular - this is a service provide by a cellphone carrier. This allows you to have your iPad connected to the Internet wherever the carrier offers service, which may be in buildings, parks, while driving, etc. just as with a cellphone. You pay a monthly fee to the cell carrier for this service. The advange is of course that it's available in many places. The primary disadvantages are the monthly cost and slower speed in the connection to the Internet.
    You can have both with an iPad if you purchase your iPad with both systems included; iPads are sold WiFi-only or WiFi+3G ("3G" refers to being capable of connecting to a cell network) You are not obligated to sign up with a cell carrier if you buy the iPad with that technology; most carriers allow you to sign up month-by-month, and in some countries the carrier has a pay-as-you-go service. If you tell us what country you're in, someone can tell you more about the available cell plans, if you're interested.
    I hope this helps. Feel free to post back if you need further clarification or have additional questions.
    Regards.

  • The Differences of JWS and Sun One?

    I am quite confused on the difference between JWS and SUN one? Is JWS part of Sun One?
    And, I am also confused on J2EE and JWS? Can JWS utilize the backend of J2EE, that say, ejb?
    Your help will be much appreciated.

    I am quite confused on the difference between JWS
    and SUN one? Is JWS part of Sun One?Sun ONE (Open Network) is a name for the web centric infrastructure Sun wants to arrive at:
    http://www.sun.com/software/sunone/faq.html#1
    Don't think of this as a already 100% worked out
    plan. Parts are there, parts are planned, parts are
    open.
    Java Web Start is a technology for beaming
    Java applications (full apps, applets, ..) to
    client machines over the Web.
    A very useful thing.
    Yes, Sun mentions it together with Sun ONE:
    http://www.sun.com/software/sunone/portfolio/plat.html
    And, I am also confused on J2EE and JWS? Can JWS
    utilize the backend of J2EE, that say, ejb?As far as I understand J2EE and its Enterprise Java Beans, they are intended to run on server machines.
    Web Start is intended for beaming Java apps to
    client machines in the first place, allowing a very
    easy installation/update which just needs a mouse click from a web page by the user to get done (once Web Start has been installed on the client).
    While it might be possible to use Web Start in
    some favourable way in the context of server
    administration, I doubt that those admins
    will use it right now. If, it most likely turn up
    in the shape of special jnlp clients, that use
    part of the Web Start technologies, not in
    shape of the present end-user client.
    Regards,
    Marc

  • What is difference between GL and PA period common and GL and PA period is

    Hi Experts,
    Can you please help me in understanding the difference between having common PA and GL period and uncommon PA and GL period. I am only aware of common PA and GL period where in implementation option there is one check box which need to check to make sure that you are using common PA and GL period.
    As per my understanding, if u open the GL period in GL module then you can able to copy those GL period in PA module.
    So once you open the GL period in PA module accordingly your PA period will also get open.
    Please confim my understanding is correct or not.
    On the other hand how is uncommon PA and GL period works? I mean in which buisness scenario you will use uncommon PA and GL period?
    Also what is the hierarchy you have to follow in order to open GL and PA period in PA module? Is it something different from common PA and GL period?
    Also In case of uncommoan GL and PA period, if the GL period for month MAY-11 is closed in GL module but present as future in PA module then what will be the impact of the transaction unposted to GL in month of MAY-11?
    Any help on this topic is appreciated.
    Regards
    and Thanks in Advance :-)

    Hi
    Your understanding of the common GL and PA period is correct. That means the period start date and end date are the same in both modules. You open a period in GL and it is open for PA as well. You can close the period in PA, so no new transactions will hit that period in PA. On the same time that period may still be open in GL, in case you need to capture journals from other sources or enter manual journals directly in GL. You should not close a period in GL before closing it in PA, AP, AR, PO etc... You can expect to see that for most PA transactions, the value of the PA period and the GL period are the same.
    Some companies manage projects by weekly periods and not by months. In that case, the PA periods are separate and different from the monthly GL periods. You need to open and close the periods independently in each of the modules. A transaction will get to separate attributes, the PA period value and the GL period value.
    Dina

  • Difference between SUN JDK V1.4.2_05 and JDK V1.4.2_07

    difference between SUN JDK V1.4.2_05 and JDK V1.4.2_07 and I want to the link in SUN for that. I want to know the bug fixes between them.

    Perhaps you should look at the documentation which comes with JDK 1.4.2_08.
    It has the bugs fixed listed.

  • Difference between read and view only -users having both permissions can download the documents

    Hi All,
     Would like to know whats the difference between view only and read permission.
    As per my requirement, my end users who have been assigned View Only should NOT be able to Download the document from a doc lib.Whereas who have Read permissions should be able to download.
    But when i tested with few users with these  permissions, those users who are having  viewonly permissions was able to  download the documents.
    how this will be true? MS says that this is not possible if it contains server side handlers.
    my customer worried about the  download-the-document part. as per them end users who have  view only permissions should not download the docs.

    Hi,
    Please check this similar thread:
    https://social.technet.microsoft.com/Forums/sharepoint/en-US/4b21a168-443b-45d3-940c-fe52e8538290/how-to-protect-sharepoint-document-not-allow-to-download?forum=sharepointadminprevious
    Your only option is to implement IRM to accomplish your requirement.
    Nico Martens
    SharePoint/Office365/Azure Consultant

  • Is there any difference between sun solaris 8 and windows for Garb.Collecti

    Hi All,
    is there any difference between refreshing the java virtual memory between sun solaris 8 and windows.i am fetching 25 records for every search action.in windows usage of java virual memory is 5 mb after every search it refreshes the memory.while using the same code in sun solaris 8 it throws heap out of memory error and for every search it wont refresh the memory.

    Some other related links
    http://java.sun.com/docs/hotspot/gc5.0/gc_tuning_5.html
    http://e-docs.bea.com/wls/docs81/perform/JVMTuning.html

  • Difference between 2 timestamp,not considering the weekends (SATURDAY,SUN)

    I use an Oracle XE and I have a table which has the following Timestamp columns
    A_Date Timestamp
    R_Date Timestamp
    Now in this query i need to be able to exclude the SAT/SUN and show the difference between these 2 timestamp dates.
    Could any one help on this?
    I use this query to find out the difference between the 2 dates (R_DATE - A_DATE),showing the DAYS:HOURS:MIN:SECS
    TRUNC (TO_NUMBER (SUBSTR ((R_DATE - A_DATE),
    1,
    INSTR (R_DATE - A_DATE, ' ')
    || ':'
    || SUBSTR ((R_DATE - A_DATE),
    INSTR ((R_DATE - A_DATE), ' ') + 1,
    2
    || ':'
    || SUBSTR ((R_DATE - A_DATE),
    INSTR ((R_DATE - A_DATE), ' ') + 4,
    2
    || ':'
    || SUBSTR ((R_DATE - A_DATE),
    INSTR ((R_DATE - A_DATE), ' ') + 7,
    2
    ) "TTR"
    Example : A_DATE := '11-Dec-2009 19:33:30 PM' ---> Friday
    R_DATE := '14-Dec-2009 07:32:38 AM' ---> Monday
    should not consider the SAT/SUN that comes between them.
    Thanks
    GAG

    SQL> create table t as (
      2  select to_timestamp('11-dec-2009 07:33:30 PM') rdate
      3  ,      to_timestamp('14-dec-2009 07:32:38 AM') adate
      4  from   dual
      5  );
    Table created.
    SQL> select rdate
      2  ,      adate
      3         /* do some final formatting */
      4  ,      to_number(substr(diff_incl_weekend, 1, instr( diff_incl_weekend, chr(32))))
      5         ||':'||
      6         substr(diff_incl_weekend, instr( diff_incl_weekend, chr(32))+1, 8) diff_incl_weekend
      7  ,      to_number(substr(diff_excl_weekend, 1, instr( diff_excl_weekend, chr(32))))
      8         ||':'||
      9         substr(diff_incl_weekend, instr( diff_excl_weekend, chr(32))+1, 8) diff_excl_weekend    
    10  from ( /* substract intervals */
    11         select to_char(rdate, 'dd-mon-yyyy hh:mi:ss AM') rdate
    12         ,      to_char(adate, 'dd-mon-yyyy hh:mi:ss AM') adate
    13         ,      trim('+'
    14                from
    15                numtodsinterval((to_date(to_char(adate, 'dd-mon-yyyy hh:mi:ss AM'), 'dd-mon-yyyy hh:mi:ss AM')
    16                                 -
    17                                 to_date(to_char(rdate, 'dd-mon-yyyy hh:mi:ss AM'), 'dd-mon-yyyy hh:mi:ss AM')
    18                                )
    19                               , 'day')
    20                    ) diff_incl_weekend
    21         ,      trim('+'
    22                from            
    23                numtodsinterval((to_date(to_char(adate, 'dd-mon-yyyy hh:mi:ss AM'), 'dd-mon-yyyy hh:mi:ss AM')
    24                                 -
    25                                 to_date(to_char(rdate, 'dd-mon-yyyy hh:mi:ss AM'), 'dd-mon-yyyy hh:mi:ss AM')
    26                                 -
    27                                 nof_satsuns.total
    28                                )
    29                               , 'day')
    30                    ) diff_excl_weekend
    31         from   t
    32         ,      /* calculate nof sats and suns*/
    33              ( select count(dy) total
    34                from ( select to_char(rdate+level-1, 'dy') dy
    35                       from   t
    36                       where  to_char(rdate+level-1, 'dy', 'nls_date_language=american') in ('sat','sun')
    37                       connect by level <= trunc(to_date(to_char(adate, 'dd-mon-yyyy hh:mi:ss AM'), 'dd-mon-yyyy hh:mi:ss AM'))
    38                                           -
    39                                           trunc(to_date(to_char(rdate, 'dd-mon-yyyy hh:mi:ss AM'), 'dd-mon-yyyy hh:mi:ss AM'))+1
    40                     )    
    41              ) nof_satsuns
    42      );
    RDATE                   ADATE                   DIFF_INCL_WEEKEND                                 DIFF_EXCL_WEEKEND
    11-dec-2009 07:33:30 PM 14-dec-2009 07:32:38 AM 2:11:59:08                                        0:11:59:08

  • Difference between Iplanet & sun

    What is the difference between iPlanet directory Server and Sun Java Directory server?

    iPlanet Dir Server was previously called Netscape Directory Server when it was version 4.X, I think it was renamed to iPlanet Dir Server since version 5.0.
    iPlanet Dir Server 5.1 is bundled with Solaris9 and If I am correct also with Solaris10.
    iPlanet Dir Server 5.2 is not bundled with Solaris9 or 10, it is also called SUN ONE Dir Server 5.2, it can be downloaded from:
    http://www.sun.com/download/products.xml?id=3ee79e69
    # pkginfo | grep -i IPLT
    system IPLTadcon Administration Server Console
    system IPLTadman Administration Server Documentation
    system IPLTadmin Administration Server
    system IPLTcons Console Client Base
    system IPLTdscon Directory Server Console
    system IPLTdsman Directory Server Documentation
    system IPLTdsr Directory Server (root)
    system IPLTdsu Directory Server (usr)
    system IPLTjss Network Security Services for Java
    system IPLTnls Nationalization Languages and Localization Support
    system IPLTnspr Portable Runtime Interface
    system IPLTnss Network Security Services
    system IPLTpldap PerLDAP
    SUN ONE DS5.2 with Patch 3 is now re-packaged as SUN JSDS5.2 and downloadable from a different URL.
    http://www.sun.com/software/javaenterprisesystem/get.xml
    # pkginfo | egrep -i "SUNWds|SUNWas"
    system SUNWast Automated Security Enhancement Tools
    system SUNWasvc Sun Java(TM) System Server Console
    system SUNWasvcp Sun Java(TM) System Administration Server Console Plugin
    system SUNWasvmn Sun Java(TM) System Administration Server Man pages
    system SUNWasvr Sun Java(TM) System Administration Server (Root)
    system SUNWasvu Sun Java(TM) System Administration Server (Usr)
    system SUNWdsvcp Sun Java(TM) System Directory Server Console Plugin
    system SUNWdsvh Sun Java(TM) System Directory Server Heap Allocator
    system SUNWdsvhx Sun Java(TM) System Directory Server Heap Allocator (64-bit)
    system SUNWdsvmn Sun Java(TM) System Directory Server Man Pages
    system SUNWdsvpl Sun Java(TM) System Directory Server PerLDAP modules
    system SUNWdsvr Sun Java(TM) System Directory Server (Root)
    system SUNWdsvu Sun Java(TM) System Directory Server (Usr)
    system SUNWdsvx Sun Java(TM) System Directory Server (64-bit)
    Gary

  • Difference Between Sun JVM and IBM JVM

    Hi
    Can some one let me on the difference between Sun JVM and IBM JVM
    regs
    Vivek Nidhi

    Sun's JVM is built on HotSpot technology: http://java.sun.com/docs/hotspot
    and covers a broad range of OS/HW combinations: http://java.sun.com/j2se/1.5.0/system-configurations.html
    Maybe you can be more specific in your question or in describing what you want to do.
    -Alexis

  • Difference between Sun Enterprise Systems and JCAPS

    Hi,
    Can somebody explain to me the differences between Sun ES and JCAPS? Is it true that JCAPS is buit on top of Sun ES? Also, does JCAPS refer to a single product or a collection of products? Which are the products needed for a developer to start off?
    Thanks

    hi *,
    CAPS is based on ES komponents like appserver or JMS server.
    CAPS is one product (one ide & environment) with many modules (connectivity , bpm .....)
    many products best is to read the manuals http://docs.sun.com/app/docs/prod/sj.caps#hic
    regards chris

  • Differences between COM & JavaScript Scripting

    Hi all,
    I have to make a sort of script that populate an InDesign document with some data from a database.
    I can do it with a Web Service called in Javascript or in C# with COM.
    Do you know the differences between COM and Javascript scripting ?
    What is the best ?
    Thank you.

    Hello,
    Would javascript be the recommanded way to go if i want to interop with it without any user interaction?
    Out goal is to produce catalogues (from another application , in C# / .net 4.0) which already contains the data. We want to be able to push that data toward indesign so direct com interop seemed to make the most sense.
    Is there a way to send javascript commands to indesign from another program (NOT to indesign server and it's web services, we want to do this directly on the locally installed indesign client)?
    Also what would be the proper way to send non textual data in indesign? (images etc) from a C# app as those can't simply be serialized as json and passed as text as part of the JS commands.
    Doing this in javascript is fine for us too as long as there is a way to pass said javascript from an external app. Or should we look completely elsewhere?
    Any means of commanding Indesign CS 5 from .net 4 would be great.
    Best regards.

  • What are the differences between Sun Certified Programmer for Java 2 Platfo

    Hi
    What are the differences between Sun Certified Web Component Developer for the Java 2 Platform, Enterprise Edition 1.4 (CX-310-081) and 5 (CX-310-083) exams?
    What has been removed from the new web component developer 5 exam?
    What has been added to the new web component developer 5 exam?
    Thanks in Advance

    what (apart from laziness) is preventing you from looking up the information for yourself?

  • Difference between Two Date Should come into Text Item

    Dear All,
    i want to get difference between two date into text Item :P36_C in On Change java script.
    i have two Date Item :P36_A and :P36_B .i have extract these date value from table then difference comes into Text Field :P36_C.
    Now i want if i change Date into Item :P36_A or Item :P36_B then Defference between two date Should Come into Item :P36_C .
    So i have use Java Script Code to do this
    <script>
      function diffdat(){
        function getVal(item){
       if($x(item).value != "")
         return parseFloat($x(item).value);
       else
         return 0;
        $x('P36_C').value =
    getval((TO_DATE('P36_B', 'DD-MON-YYYY'))-
    getval(TO_DATE('P36_A', 'DD-MON-YYYY')))+1;
    </script>
    i have put this into Item HTML Form Element Attributes 
    onChange="javascript:diffdat();"it's not woring .
    How to work that Code with dates.
    Thanks

    You can always create your own difference function based on your own criteria. You can modify this to suit your needs.
    CREATE OR REPLACE FUNCTION CALC_OFFICE_DAYS(date1 DATE, date2 DATE)
    RETURN NUMBER
    IS
    v_begin_date DATE := date1;
    v_end_date DATE := date2;
    v_office_start_time VARCHAR2(10) := '09:30 AM';
    v_office_end_time VARCHAR2(10) := '06:30 PM';
    v_comp_begin_time DATE;
    v_comp_end_time DATE;
    v_days PLS_INTEGER := 0;
    v_hrs NUMBER := 0;
    v_ttltm NUMBER;
    BEGIN
    select trunc(v_end_date) - trunc(v_begin_date)
    into v_days
    from dual;
    select to_date(to_char(sysdate,'DD-MM-YYYY')||' '||to_char(v_begin_date,'HH24:MI'),'DD-MM-YYYY HH24:MI')
    into v_comp_begin_time
    from dual;
    select to_date(to_char(sysdate,'DD-MM-YYYY')||' '||to_char(v_end_date,'HH24:MI'),'DD-MM-YYYY HH24:MI')
    into v_comp_end_time
    from dual;
    select (v_comp_end_time - v_comp_begin_time)/24 into v_hrs from dual;
    IF v_hrs > 4 then
    v_ttltm := v_days + .5;
    ELSE
    v_ttltm := v_days;
    END IF;
    return v_ttltm;
    END;
    As has been noted, this question is best posted on the PL/SQL forum.

Maybe you are looking for

  • Table for getting open PR quantity

    Hi I have one requirement........ I have created a PR for 100 nos. Then I created a PO with ref. to this PR for 25 nos. Now i want to capture how much open PR quantity (75 nos) is present in the system. In which table I can get this information? Rgds

  • Invitations not being sent out on Calendar Server 6.3

    We would be grateful for any help on this. We can give further details if needed, please just let us know. Thanks very much. Issue: To our customers the calendars server appears to be fully operational and without error. However, when a customer crea

  • Using modular files of HTML pieces (JS only, no Server)..?

    I'd like to create a working method where I have HTML parts seperated into individual files. I am dealing strictly with HTML, CSS, Javascript. So the idea is to have: <individual page contents> <LINKED HTML: site menu div (ediable as a seperate HTML

  • Timezones in Calendar

    Hi, I've created some recurring events in my MS Outlook calendar. The times for these events have a timezone of "Dublin, Edinburgh, Lisbon, London". When I sync the events onto my iPhone, the new events have a timezone "GMT". Because of this, any eve

  • How to make arch safe enough to remote desktop?

    I have a dsl connection at home, and I need to remote from work to my home usually. Sometimes I need to reboot my computer at home from a remote connection because I need to change to another OS. The problem with arch, is that if adsl is not able to