On 20.11.2008, at 07:05 , Charles Oliver Nutter wrote:

> Einar Magn=FAs Boson wrote:
>> I am trying to test out profligacy for GUI as it seems to make it =20
>> 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 =20=

>> unpack` profligacy and manually specify the path.
>> Can anyone explain to me what I need to do to compile this to class-=20=

>> files that will run on a computer with only normal java installed? =20=

>> where does the main-method go?
>
> 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