This article describes a Java Card programming environment which to a large extent is generated from formal specifications of the syntax and semantics of Java Card, the JCRE (Java Card Runtime Environment), and the Java Card APIs. The resulting environment consists of a set of tightly integrated and somewhat smart tools, such as a Java specific structure editor and a simulator which allows an application to be tested before being downloaded to a card. Furthermore, the simulator analyses the applet in question in order to find out the structure of the accepted commands. This information is then used to automatically adapt the GUI of the simulator.