FIGUE
+Figue *Intro *Requirements *Download *Getting Started
*What's New *FAQs *How To *Demos *Contributions
*Tutorial *API *Limits & Bugs *Design

Getting Started

* Before You Go On

At this point, you should have downloaded and installed Figue.

From now on we will assume that you have chosen to extract Figue into a directory called TOOLS. You will have to modify the following commands appropriately with the accurate name.

* Verifying the Installation

  • Using a text editor, create a file named HelloWorld.java with the following code

    import figue.*;
    import java.awt.Frame;
    
    public final class HelloWorld {
        public final static void main(String[] args) {
    	final AWTFacade theFacade = new AWTFacade();
    	final Frame theAppli = new Frame("Hello World");
    	theAppli.setBounds(50,50,300,100);
    	theAppli.add(theFacade.getAwtComponent());
    	theAppli.validate();
    	theAppli.setVisible(true);
            PathInterface thePath = new Path();
            thePath.addOperation(
              new InsertGlyph(Atom.newAtom("Hello World"),0));
            theFacade.buildInit(thePath);
            theFacade.buildComplete();	
        }   
    }

  • Compile the source file using the Java compiler

    • Microsoft SDK on NT
      jvc.exe HelloWorld.java
    • Sun JDK on Unix / NT
      javac HelloWorld.java

    If the compilation succeeds, the compiler creates a file named HelloWorld.class in the same directory as the Java source file

  • Run the application using the Java interpreter

    • Microsoft SDK on NT
      jview.exe HelloWorld
    • Sun JDK on Unix / NT
      java HelloWorld

    After you have verified that HelloWorld runs, type Control-C to shut it down.

  • If you have any trouble running the "Hello World" test see the common troubleshootings and their solutions.

* How do I use it ?

* Troubleshooting

  • Symptom
    bagheera$ javac HelloWorld.java 
    HelloWorld.java:1: Package figue not found in import.
    import figue.*;
           ^
    1 error
    bagheera$
    • Short answer

      The figue archive is not in your classpath
      bagheera$ echo $CLASSPATH
      
      bagheera$

    • Corrective action

      Put the TOOLS/aioli/modules/figue/classes/figue.jar file in your classpath

      bagheera$ CLASSPATH=TOOLS/aioli/modules/figue/
      classes/figue.jar 
      bagheera$ echo $CLASSPATH
      TOOLS/aioli/modules/figue/classes/figue.jar
      bagheera$
  • Symptom
    zephir$ javac HelloWorld.java 
    HelloWorld.java:6: Missing term.
        public final static void main(String[] args) {
                                                      ^
    HelloWorld.java:6: ';' expected.
        public final static void main(String[] args) {
                                                      ^
    HelloWorld.java:7: Invalid expression statement.
            final AWTFacade theFacade = new AWTFacade();
            ^
    3 errors
    zephir$
    • Short answer

      You are still using Java 1.0

      zephir$ java -version
      java version "1.0.2dp:11/13/96-15:42"
    • Corrective action

      Modify you path or install Java 1.1

      zephir$ PATH=/usr/local/java11/bin:$PATH
      zephir$ which java
      /usr/local/java11/bin/java
      zephir$ java -version
      java version "1.1.5"
      zephir$
  • Symptom
    bagheera$ java HelloWorld 
    Can't find class HelloWorld
    bagheera$
    • Short answer

      You testing directory is not in your CLASSPATH

      zephir$ echo $CLASSPATH
      TOOLS/aioli/modules/figue/classes/figue.jar
      zephir$
    • Corrective action

      Put the testing directory in your classpath

      zephir$ ls HelloWorld.class 
      HelloWorld.class
      zephir$ CLASSPATH=.:$CLASSPATH
      zephir$ echo $CLASSPATH
      .:TOOLS/aioli/modules/figue/classes/tutorial.jar
      zephir$

+Figue *Intro *Requirements *Download *Getting Started
*What's New *FAQs *How To *Demos *Contributions
*Tutorial *API *Limits & Bugs *Design

Comments or suggestions?
Need some help?
Copyright ©1998 INRIA
Last updated 4 November 1998 by Bruno Conductier
FIGUE