/tutorial/cecil/JVM/Example3.java

http://github.com/tybor/Liberty · Java · 29 lines · 11 code · 6 blank · 12 comment · 0 complexity · af4db970d93cd261682ba70dceaefdbf MD5 · raw file

  1. import root3.*;
  2. public class Example3 {
  3. /* To run this example, procede like this :
  4. compile_to_jvm root3
  5. /bin/rm -f root3.class
  6. javac Example3.java
  7. java Example3
  8. */
  9. public static void main(String[] args) {
  10. root3 root;
  11. string eiffel_string;
  12. /* To initialize the Eiffel runtime :
  13. */
  14. _any._initialize_eiffel_runtime(args);
  15. /* Creation of the root object :
  16. */
  17. root = new root3();
  18. eiffel_string = (string)(root.get_string());
  19. root.put_string(eiffel_string);
  20. }
  21. }