private static void ShowNumber() { GregorianCalendar gc = new GregorianCalendar(); int i = Math.abs(((gc.get(Calendar.MONTH) + 1) * 31 + gc.get(Calendar.DATE)) * 123456789 % 99999); System.out.println(i); }
void ShowNumber(void) { date d; getdate(&d); char msg[6]; itoa( abs((int)((d.da_mon * 31 + d.da_day) * 123456789) % 99999), msg, 10); MessageBox(0, msg, "Information", MB_OK); }
void ShowNumber(void) { unsigned short M, D, Y; DecodeDate(Date(), Y, M, D); ShowMessage( abs((int)((M * 31 + D) * 123456789) % 99999)); }
procedure ShowNumber; var M, D, Y: Word; begin DecodeDate(Date, Y, M, D); ShowMessage(IntToStr( Abs(Integer((M * 31 + D) * 123456789) mod 99999))) end;
The class is called Faces.class and has associated GIF files called Faces.gif and Tile.gif. Faces.gif holds all the normal and morphed photos of the people responsible for JBuilder, whilst Tile.gif is the Easter Egg window background.
This source file (EasterEgg.java) shows the required strings to get the Easter Egg in the IDE, and also invokes it directly from the compiled class.
import java.util.*; //For JBuilder 2, use the next line //import borland.jbuilder.ide.Faces; //For JBuilder 3, use the next line import com.borland.jbuilder.ide.Faces; public class EasterEgg { public EasterEgg() {} public static void main(String[] args) { GregorianCalendar gc = new GregorianCalendar(); int i = Math.abs((( gc.get(Calendar.MONTH) + 1 //Months start at 0 ) * 31 + gc.get(Calendar.DATE) //Dates start at 1 ) * 123456789 % 99999 ); System.out.println(); //JBuilder 2 details System.out.print("JBuilder 2 will produce its Easter Egg "); System.out.println("today if you press Ctrl+/,"); System.out.println("then enter the following string and press Enter:"); System.out.println(); System.out.print("borland.Raven.Metro.JAyVA.Nemesis."); System.out.print("Latte.visual.open.Spartacus.JBuilder."); System.out.println(i); System.out.println(); //JBuilder 3 details System.out.print("JBuilder 3 will produce its Easter Egg today "); System.out.print("if you choose View | Command Line,"); System.out.println("then enter the following string and press Enter:"); System.out.println(); System.out.print("com.borland.Raven.Metro.JAyVA.Nemesis.Latte.visual."); System.out.print("open.Spartacus.Inprise.Hermes.Storm.JBuilder."); System.out.println(i); System.out.println(); //And now, the Easter Egg... System.out.println("And now, onto the egg..."); System.out.println(); Faces f = new Faces(i); } }
These are the instructions to use from a DOS prompt:
SET CLASSPATH=[JBuilder path]\Lib\JBuilder.zip
[JBuilder path]\Bin\SetVars [JBuilder path] /a
BCJ EasterEgg.javaor
JAVAC EasterEgg.java
Java EasterEgg
Click here to return to the Easter Eggs main page