PageRenderTime 39ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/trunk/Examples/ruby/java/runme.rb

#
Ruby | 18 lines | 11 code | 7 blank | 0 comment | 0 complexity | 5e64485eed2e78bdf100b4950ac025a7 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. require 'example'
  2. Example.JvCreateJavaVM(nil)
  3. Example.JvAttachCurrentThread(nil, nil)
  4. e1 = Example::Example.new(1)
  5. e2 = Example::Example.new(2)
  6. print e1.Add(1,2),"\n"
  7. print e1.Add(1.0,2.0),"\n"
  8. e3 = e1.Add(e1,e2)
  9. print e3.mPublicInt,"\n"
  10. print e1.Add("1","2"),"\n"
  11. Example.JvDetachCurrentThread()