以前有篇文章是写给Delphi程序增加对Pax JavaScript的支持
今天研究了一下给Java程序增加对 Ruby 的支持
目前可以通过 Apache的 BSF(Bean Script Framework)
和Sun的 Java Scripting(javax.script)
Continue reading “Java程序中引入JRuby”
以前有篇文章是写给Delphi程序增加对Pax JavaScript的支持
今天研究了一下给Java程序增加对 Ruby 的支持
目前可以通过 Apache的 BSF(Bean Script Framework)
和Sun的 Java Scripting(javax.script)
Continue reading “Java程序中引入JRuby”
用gem安装wxruby2
c:>gem install wxruby2-preview
在文件前面增加下列代码
begin
require "wx"
rescue LoadError => no_wx_err
begin
require "rubygems"
require "wx"
rescue LoadError
raise no_wx_err
end
end
测试:
class TroutApp < Wx::App
def on_init
frame = Wx::Frame.new(nil, -1, "Tiny wxRuby Application")
panel = Wx::StaticText.new(frame, -1, "You are a trout!",
Wx::Point.new(-1,1), Wx::DEFAULT_SIZE,
Wx::ALIGN_CENTER)
frame.show
end
end
TroutApp.new.main_loop
update:
FOX界面库
require "fox16"
include Foxapplication = FXApp.new("Hello", "FoxTest")
application.init(ARGV)
main = FXMainWindow.new(application, "Hello", nil, nil, DECOR_ALL)
FXButton.new(main, "&Hello, World!", nil, application, FXApp::ID_QUIT)
application.create()
main.show(PLACEMENT_SCREEN)
application.run()