# Jruby, profligacy

**URL:** <https://www.ruby-forum.com/t/jruby-profligacy/153680>\
**Category:** Ruby\
**Created:** [November 20, 2008, 2:14am UTC](https://www.ruby-forum.com/t/jruby-profligacy/153680 "2008-11-20T02:14:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Einar\_MagnSSSSs\_Bos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/a5b964/32.png) [@Einar\_MagnSSSSs\_Bos](https://www.ruby-forum.com/u/Einar_MagnSSSSs_Bos)\
**Post date:** [November 20, 2008, 2:14am UTC](https://www.ruby-forum.com/t/jruby-profligacy/153680/1 "2008-11-20T02:14:30Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![Einar\_MagnSSSSs\_Bos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/a5b964/32.png) [@Einar\_MagnSSSSs\_Bos](https://www.ruby-forum.com/u/Einar_MagnSSSSs_Bos)\
**Post date:** [November 20, 2008, 8:10am UTC](https://www.ruby-forum.com/t/jruby-profligacy/153680/2 "2008-11-20T08:10:07Z")

</div>

Einar MagnÃºs Boson wrote:

> 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](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

---

<div class="post-metadata">

**Author:** ![Einar\_MagnSSSSs\_Bos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/a5b964/32.png) [@Einar\_MagnSSSSs\_Bos](https://www.ruby-forum.com/u/Einar_MagnSSSSs_Bos)\
**Post date:** [November 20, 2008, 10:24am UTC](https://www.ruby-forum.com/t/jruby-profligacy/153680/3 "2008-11-20T10:24:26Z")

</div>

On 20.11.2008, at 07:05 , Charles Oliver N. wrote:

> 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

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  
the same thing as `jruby ProfTest.rb` is doing when ProfTest.rb  
contains:

require ‘profligacy/swing’  
require ‘profligacy/lel’

module Test  
include\_package ‘javax.swing’  
include Profligacy

layout = "  
[label\_1 | label3]  
[(300,300)\*text1 | (150)people]  
[\<label2 | \_]  
[message | buttons]  
"

ui = Swing::LEL.new(JFrame,layout) do |c,i|  
c.label\_1 = JLabel.new “The chat:”  
c.label2 = JLabel.new “What you’re saying:”  
c.label3 = JLabel.new “The people:”  
c.text1 = JTextArea.new  
c.people = JComboBox.new  
c.message = JTextArea.new

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

```

end

ui.build(:args =\> “Simple LEL Example”)  
end

how do I include jruby and profligacy inside a jar?

einarmagnus

---

<div class="post-metadata">

**Author:** ![Einar\_MagnSSSSs\_Bos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/a5b964/32.png) [@Einar\_MagnSSSSs\_Bos](https://www.ruby-forum.com/u/Einar_MagnSSSSs_Bos)\
**Post date:** [November 20, 2008, 4:12pm UTC](https://www.ruby-forum.com/t/jruby-profligacy/153680/4 "2008-11-20T16:12:12Z")

</div>

Einar Magnús Boson wrote:

> how do I include jruby and profligacy inside a jar?

Look at Rawr

[http://rawr.rubyforge.org/](http://rawr.rubyforge.org/)

–  
James B.

[www.happycamperstudios.com](http://www.happycamperstudios.com) - Wicked Cool Coding  
[www.jamesbritt.com](http://www.jamesbritt.com) - Playing with Better Toys  
[www.ruby-doc.org](http://www.ruby-doc.org) - Ruby Help & Documentation  
[www.rubystuff.com](http://www.rubystuff.com) - The Ruby Store for Ruby Stuff
