Error No Source Info Public Abstract Class Java.util.calendar
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up GWT Incubator PagingScrollTable compile error up vote 1 down vote favorite I'm trying to implement this example: http://zenoconsulting.wikidot.com/blog:17 in my gwt app but when i try to compile the project i have this error : Compiling module com.myapp.security.GwtSpringSecurityProject Validating newly compiled units Ignored 2 units with compilation errors in first pass. Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors. Scanning for additional dependencies: jar:file:/C:/_work/Eclipse/MyApp/war/WEB-INF/lib/gwt-incubator-20101117-r1766.jar!/com/google/gwt/gen2/table/client/AbstractScrollTable.java Computing all possible rebind results for 'com.google.gwt.gen2.table.client.AbstractScrollTable.Impl' Rebinding com.google.gwt.gen2.table.client.AbstractScrollTable.Impl Could not find an exact match rule. Using 'closest' rule
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join http://stackoverflow.com/questions/13083009/gwt-incubator-pagingscrolltable-compile-error them; it only takes a minute: Sign up gwt: No source code is available for type java.util.Calendar up vote 12 down vote favorite 2 I tried to use java.util.Calendar in my GWT application as following: Calendar cal = Calendar.getInstance(); then i got this error: No source code is available for type java.util.Calendar; did you forget to inherit a required http://stackoverflow.com/questions/4170827/gwt-no-source-code-is-available-for-type-java-util-calendar module? anyone know what's wrong with it? java gwt share|improve this question edited Jan 16 '13 at 13:10 user195488 asked Nov 13 '10 at 3:37 user468587 1,20453054 2 Since you have some responses below that seem to answer your question, please consider marking one of them as ‘Accepted’ by clicking on the tickmark below their vote count (see How do you accept an answer?). This shows which answer helped you most, and it assigns reputation points to the author of the answer (and to you!). –Martin Schröder Nov 8 '12 at 11:20 add a comment| 6 Answers 6 active oldest votes up vote 10 down vote +50 The relevant bug is logged in GWT since GWT version 1.3 and you can find it here - http://code.google.com/p/google-web-toolkit/issues/detail?id=603 1) The Calendar class support for GWT is a long pending request from GWT User community. 2) Unfortunately GWT team has decided we can do without it. You can find all possible discussions on Google GWT forum. There are other alternatives which you look up in the for
8u40-b25 8-b132 7u40-b43 7-b147 6-b27 6-b14 / java.util.Calendar Find error no source Usages Diff Raw Download HTML Widget oh o [] Start line: End line: Snippet Preview Snippet HTML Code Stack Overflow Questions 1/*2*Copyright1996-2007SunMicrosystems,Inc.AllRightsReserved.3*DONOTALTERORREMOVECOPYRIGHTNOTICESORTHISFILEHEADER.4*5*Thiscodeisfreesoftware;youcanredistributeitand/ormodifyit6*underthetermsoftheGNUGeneralPublicLicenseversion2only,as7*publishedbytheFreeSoftwareFoundation.Sundesignatesthis8*particularfileassubjecttothe"Classpath"exceptionasprovided9*bySunintheLICENSEfilethataccompaniedthiscode.10*11*Thiscodeisdistributedinthehopethatitwillbeuseful,butWITHOUT12*ANYWARRANTY;withouteventheimpliedwarrantyofMERCHANTABILITYor13*FITNESSFORAPARTICULARPURPOSE.SeetheGNUGeneralPublicLicense14*version2formoredetails(acopyisincludedintheLICENSEfilethat15*accompaniedthiscode).16*17*YoushouldhavereceivedacopyoftheGNUGeneralPublicLicenseversion18*2alongwiththiswork;ifnot,writetotheFreeSoftwareFoundation,19*Inc.,51FranklinSt,FifthFloor,Boston,MA02110-1301USA.20*21*PleasecontactSunMicrosystems,Inc.,4150NetworkCircle,SantaClara,22*CA95054USAorvisitwww.sun.comifyouneedadditionalinformationor23*haveanyquestions.24*/2526/*27*(C)CopyrightTaligent,Inc.1996-1998-AllRightsReserved28*(C)CopyrightIBMCorp.1996-1998-AllRightsReserved29*30*Theoriginalversionofthissourcecodeanddocumentationiscopyrighted31*andownedbyTaligent,Inc.,awholly-ownedsubsidiaryofIBM.These32*materialsareprovidedundertermsofaLicenseAgreementbetweenTaligent33*andSun.ThistechnologyisprotectedbymultipleUSandInternational34*patents.ThisnoticeandattributiontoTaligentmaynotberemoved.
of the API class Calendar defined as: public abstract class Calendar The following code: Calendar dateOfBirth = new Calendar(); generates the following compilation error: java.util.Calendar is abstract; cannot be instantiated Calendar dateOfBirth = new Calendar(); ^ But, the API documentation says: "Calendar's getInstance method returns a Calendar object whose calendar fields have been initialized with the current date and time" The following code compiles and runs: Calendar dateOfBirth = Calendar.getInstance(); Later on, I use dateOfBirth by sending a message to the object dateOfBirth.set( 1960, 0, 1 ); This works just fine. I don't get it. Using the keyword "new" is an error because an abstract class cannot be instantiated, but using Calendar.getInstance() creates an object? Those statements seem contradictory. Furthermore, I thought that an abstract class is actually a superclass, and that the programmer (me) would have to create a subclass that extends the abstract superclass, and that defines the bodies of the abstract methods. Obviously, I'm not doing that when I use the Calendar class. What is really going on here? A. An answer: Below are information that I hope will shed some light on your inquiry: a. It's true that an abstract class cannot be instantiated. As you reported, new Calendar() does not work. b. Using a getInstance() method to generate an instance of some class is a "convention" in many Java classes. It's particularly common in many of the cryptography related classes (in javax.crypto), such as CertificateFactory, Cipher, KeyFactory, KeyPairGenerator, KeyStore, MessageDigest, and so on. c. Calendar is not the only abstract class that allows the user to use getInstance() to produce an object of the class. KeyPairGenerator and MessageDigest, for example, are abstract classes with getInstance() methods as well. d. The object returned by the getInstance() method of an abstract class is not an object of that class itself; instead, it is an object of one of its concrete subclasses. For example, the object returned by Calendar.getInstance() is an object of the class GregorianCalendar, which is a concrete subclass of the Calendar class. That means the statement Calendar c = Calendar.getInstance(); is the same as Calendar c = new GregorianCalendar(); As we discussed in class, because GregorianCalendar is a subclass of Calendar, it is ok to assign an object