JRuby最新事情@札幌

  • 950 views
Uploaded on

 

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
950
On Slideshare
0
From Embeds
0
Number of Embeds
2

Actions

Shares
Downloads
7
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. 12.0 Ruby 1.8.7 Ruby 1.9.1 10.0 JRuby 1.4.0 8.0 6.0 4.0 2.0 0 100 200 300 400 500
  • 2. camelCase() snail_case() java_send java_alias
  • 3. require 'java' import javax.swing.JFrame import javax.swing.JButton frame = JFrame.new 'Hello Application' button = JButton.new 'Hello World!' button.add_action_listener do frame.dispose end frame.get_content_pane.add button frame.pack frame.set_visible true
  • 4. ScriptingContainer
  • 5. ScriptEngineManager manager = new ScriptEngineManager(); ScriptEngine engine = manager.getEngineByName("jruby"); engine.eval("puts "Hello World!"");
  • 6. require 'ffi' module Kernel extend FFI::Library attach_function :getlogin, [], :pointer end puts getlogin.read_string