JIT Bug: JITError.setClocksubcategory: jit synopsis: A nonfatal internal JIT (3.00.078(x)) error description: A nonfatal internal JIT (3.00.078(x)) error 'Structured Exception(c0000005)' has occurred in : 'JITError.setClock (I)V' : Interpreting method. Please report this error in detail to http://java.sun.com./cgi-bin/bugreport.cgi The bug does not show up to the user and does not present any problems in this applet. It has been reported and will be fixed said nobody at Sun.
| ||
Source
import java.awt.*;
import java.applet.*;
import java.awt.event.*;
/**
*
* An Applet to demostrate Java 2
* JIT JRE error
* found while implementing a simple
* clock.
* @author http://www.whatrain.com/
* @version beta 0.1
* @author Timothy M. Radonich
* @author WhatRain Internet Services
*
*/
public class JITError extends Applet implements
Runnable
{
// ========================================
// APPLET METHODS
// ========================================
public void JITError()
{
}
public void init()
{
setSize(222,222);
setBackground( SystemColor.activeCaptionBorder );
time = 0 ;
add( timeLabel );
add( timeDisplay );
}
// ===========================================
// PUBLIC INTERFACE
// ===========================================
public void setClock( int t)
{
String stringDays ;
String stringHours ;
String stringMinutes ;
int days = t / 1440 ;
stringDays = new Integer(days).toString() ;
int hours = (t % 1440) / 60 ;
if( hours < 10 ) stringHours = "0" +
new Integer(hours).toString() ;
else stringHours =
new Integer(hours).toString() ;
int minutes = (t % 1440) % 60 ;
if( minutes < 10 ) stringMinutes = "0" +
new Integer(minutes).toString() ;
else stringMinutes =
new Integer(minutes).toString() ;
timeDisplay.setText(stringDays + ":" +
stringHours + ":" + stringMinutes);
}
// ===========================================
// IMPLEMENT RUNNABLE
// ===========================================
public void run()
{
while ( true )
{
// Thread actions
time ++ ;
setClock( time ) ;
try { thisThread.sleep( 20 ); } // Adjust
catch ( InterruptedException e ) {;}
}
}
public void start()
{
if ( thisThread == null )
{
thisThread = new Thread(this);
thisThread.start();
}
}
// ========================================
// CLASS ATTRIBUTES
// ========================================
private int time ;
Thread thisThread = null;
// ========================================
// USER INTERFACE
// ========================================
private Label timeLabel =
new Label(" Time:", Label.RIGHT);
private Label timeDisplay =
new Label(" ");
}
|
| WhatRain Java Examples | WhatRain Java 2 Examples |
Visit
|
This site designed and maintained by WhatRain WWW Services Contact Us |
Copyright © 1999 Timothy M. Radonich