jruby, profligacy

  • Thread starter Einar Magnús Boson
  • Start date
E

Einar Magnús Boson

I am trying to test out profligacy for GUI as it seems to make it
reasonably simple to use swing.
http://ihate.rubyforge.org/profligacy/lel.html

taking their examples I can get them to run although I had to `gem
unpack` profligacy and manually specify the path.
Can anyone explain to me what I need to do to compile this to class-
files that will run on a computer with only normal java installed?
where does the main-method go?

thank you

einarmagnus
 
C

Charles Oliver Nutter

Einar said:
I am trying to test out profligacy for GUI as it seems to make it
reasonably simple to use swing.
http://ihate.rubyforge.org/profligacy/lel.html

taking their examples I can get them to run although I had to `gem
unpack` profligacy and manually specify the path.
Can anyone explain to me what I need to do to compile this to
class-files that will run on a computer with only normal java installed?
where does the main-method go?

Compilation is not hard, but you'll always need to ship JRuby if it's
not already present on the target machine. That's not hard either,
though. Is that what you want to do?

- Charlie
 
E

Einar Magnús Boson

Compilation is not hard, but you'll always need to ship JRuby if =20
it's not already present on the target machine. That's not hard =20
either, though. Is that what you want to do?

- Charlie


I'm sure it isn't, I'm just not that used to java anymore. been a while.
I guess what I want to is to end up with a .jar that when run will do =20=

the same thing as `jruby ProfTest.rb` is doing when ProfTest.rb =20
contains:

require 'profligacy/swing'
require 'profligacy/lel'

module Test
include_package 'javax.swing'
include Profligacy

layout =3D "
[ label_1 | label3 ]
[ (300,300)*text1 | (150)people ]
[ <label2 | _ ]
[ message | buttons ]
"

ui =3D Swing::LEL.new(JFrame,layout) do |c,i|
c.label_1 =3D JLabel.new "The chat:"
c.label2 =3D JLabel.new "What you're saying:"
c.label3 =3D JLabel.new "The people:"
c.text1 =3D JTextArea.new
c.people =3D JComboBox.new
c.message =3D JTextArea.new

c.buttons =3D Swing::LEL.new(JPanel, "[send|hate|quit]") do |c,i|
c.send =3D JButton.new "Send"
c.hate =3D JButton.new "Hate"
c.quit =3D JButton.new "Quit"
end.build :auto_create_container_gaps =3D> false
end

ui.build:)args =3D> "Simple LEL Example")
end

how do I include jruby and profligacy inside a jar?


einarmagnus
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top