/tutorial/cecil/JVM/Example2.java

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

  1. import root2.*;
  2. public class Example2 {
  3. /* To run this example, procede like this :
  4. compile_to_jvm root2
  5. /bin/rm -f root2.class
  6. javac Example2.java
  7. java Example2
  8. */
  9. public static void main(String[] args) {
  10. root2 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 root2();
  18. eiffel_string = (string)(root.get_string());
  19. root.put_string(eiffel_string);
  20. }
  21. }