Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Visual J# / March 2004

Tip: Looking for answers? Try searching our database.

GregorianCalendar

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jason - 23 Mar 2004 17:20 GMT
I am trying to use a class that we wrote that extends
GregorianCalendar.  But I get a CLR error
System.TypeInitializationException: The type initializer
for java.lang.System threw an exception.

What does this mean?
Lars-Inge T?nnessen - 23 Mar 2004 17:44 GMT
It means you should please show us your code.  =:o)

Do you use the .net GregorianCalendar or the java GregorianCalendar ?

public class YoMan extends System.Globalization.GregorianCalendar
//java.util.GregorianCalendar
{
   public YoMan()
   {
       super();
   }
}

/**
* Summary description for Class1.
*/
public class Class1
{
   public Class1()
   {
       YoMan on = new YoMan();
       System.Console.WriteLine("Day: "+on.GetDayOfWeek(
System.DateTime.get_Now() ) );
     }

   /** @attribute System.STAThread() */
   public static void main(String[] args)
   {
       new Class1();
   }
}

Lars-Inge T?nnessen
www.larsinge.com
Jason - 23 Mar 2004 17:49 GMT
I am using the java.util version.  Is that a problem?

> It means you should please show us your code.  =:o)
>
[quoted text clipped - 30 lines]
> Lars-Inge T?nnessen
> www.larsinge.com
Lars-Inge T?nnessen - 23 Mar 2004 18:15 GMT
No, that is no problem.

Please give us a hint, show us your code.

public class YoMan extends java.util.GregorianCalendar
{
   public YoMan()
   {
       super();
   }
}

/**
* Summary description for Class1.
*/
public class Class1
{
   public Class1()
   {
       YoMan on = new YoMan();
       System.Console.WriteLine("Day: "+on.getTime().toGMTString() );
   }

   /** @attribute System.STAThread() */
   public static void main(String[] args)
   {
       new Class1();
   }
}

Lars-Inge T?nnessen
www.larsinge.com
Jason - 23 Mar 2004 19:12 GMT
Its nothing more advanced than yours.

> No, that is no problem.
>
[quoted text clipped - 28 lines]
> Lars-Inge T?nnessen
> www.larsinge.com

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.