|
|
|
|
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$ |
- 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$ |
- Symptom
|
bagheera$ java HelloWorld
Can't find class HelloWorld
bagheera$ |
|
|
|
|
|
|
|
|
|