home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AmigActive 3
/
AACD03.BIN
/
AACD
/
Programming
/
sofa
/
archive
/
SmallEiffel.lha
/
SmallEiffel
/
man
/
compile_to_jvm.txt
< prev
next >
Wrap
Text File
|
1999-06-05
|
4KB
|
108 lines
The compile_to_jvm command
Usage
compile_to_jvm [options] <Root-Class> [<Root-Procedure>]
Command compile_to_jvm is the SmallEiffel Java byte code generator for
the Java Virtual Machine.
Command compile_to_jvm must have at least one argument to indicate the
starting execution point of the system.
Thus, execution will start in <Root-Procedure> of <Root-Class>. The
default <Root-Procedure> is make.
Loading path for Eiffel source files
compile_to_jvm uses the technique described in the documentation for
command [1]finder to locate the Eiffel source files it tries to
compile.
Options to select Eiffel compilation modes
As for command compile_to_c there are 8 different compilation modes :
-boost, -no_check, -require_check, -ensure_check, -invariant_check,
-loop_check and -all_check.
Options have the same meaning as for compile_to_c. See [2]compile_to_c
documentation for details.
Other options
-o <output_name>:
Place the main output in file <output_name>.class and other
class files in directory <output_name>. When this option is not
present, the default is <Root-Class>.
-verbose:
to have information during the compilation (the full path of
loaded files is printed, type inference score, created class
files, etc).
-version:
Show the number of the [3]version of SmallEiffel you're using.
-no_style_warning:
Suppress output for warning messages related to non respect of
standard Eiffel style guidelines (for example ItEm will not
trigger a warning).
-case_insensitive:
Switch case insensitive mode on.
For example, when this mode is selected, the Eiffel parser
considers that the following identifiers refer to the same
feature: item, ITEM, ItEm, ...
-no_warning:
Suppress output for all warning messages (error messages are
still printed).
The SmallEiffelRuntime.java class
The SmallEiffelRuntime.java class implements some low level external
features. This file is in the directory SmallEiffel/sys/runtime. The
file SmallEiffelRuntime.class must be present to execute the Java
byte-code generated by command compile_to_jvm. Do not forget to add
this class in your Java CLASSPATH system environment variable. You can
also copy the file SmallEiffelRuntime.class in some appropriate
directory.
Examples
Example 1
When SmallEiffel is correctly installed, you can simply type the
following command to test the hello world program :
compile_to_jvm hello_world
Then, in order to execute the produced Java byte code, you can use
command :
java hello_world
Example 2
As for command compile_to_c you can add the option -boost to avoid all
assertions checks :
compile_to_jvm -boost hello_world
Example 3
To change the name of the output main class, you have to add the
option -o :
compile_to_jvm -boost -o out hello_world
Then, you can run the Java byte code with :
java out
Note that the name used for the class files directory is also changed
(this directory is also named out).
Example 4
Finally, the -verbose option may be useful to check what files are
loaded, what files are created, or to fix some installation problem :
compile_to_jvm -verbose hello_world
[Line]
Copyright © Dominique COLNET and Suzanne COLLIN - [4]<colnet@loria.fr>
Last update: 05 June 1999, by DC & OZ.
References
1. file://localhost/home/colnet/SmallEiffel/man/man/finder.html
2. file://localhost/home/colnet/SmallEiffel/man/man/compile_to_c.html
3. file://localhost/home/colnet/SmallEiffel/man/man/SmallEiffelFAQ.html#Q02
4. mailto:colnet@loria.fr