Athena

JBuilder 2 and 3 Easter Egg Code

Source to calculate the JBuilder Easter Egg magic number in various languages
Java source to invoke the Easter Egg directly


Source to calculate the JBuilder Easter Egg magic number in various languages

In order to find the magic number that allows the most interesting JBuilder 2 and 3 Easter Egg to be displayed, programmers can run some code to calculate the value from the current date.


Java source to invoke the Easter Egg directly

As a way of avoiding the lengthy sequence needed to get to the interesting JBuilder 2 and 3 Easter Egg, you can take a shortcut. The source for the Easter Egg is contained in a compiled class in the JBuilder.zip archive in JBuilder's Lib directory.

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:

  1. Add in the path to the IDE code:
    
            SET CLASSPATH=[JBuilder path]\Lib\JBuilder.zip
            
  2. Add in the path to JBCL and Data Express components:
    
            [JBuilder path]\Bin\SetVars [JBuilder path] /a
            
  3. Compile the .java file to a .class file, either by loading it into the IDE and compiling it, or with one of the command line compilers:
    
            BCJ EasterEgg.java
            
    or
    
            JAVAC EasterEgg.java
            
  4. Run the source file
    
            Java EasterEgg
            

Click here to return to the Easter Eggs main page