JRuby + Java Web Start gems can't be loaded
-------------------------------------------

                 Key: JRUBY-4544
                 URL: http://jira.codehaus.org/browse/JRUBY-4544
             Project: JRuby
          Issue Type: Bug
    Affects Versions: JRuby 1.5
         Environment: Mac OS X 10.5.8, Java 1.6, JRuby 1.5.0dev
            Reporter: Gonzalo Suárez
            Assignee: Thomas E Enebo


I have the following simple JRuby app:

gui.rb file:
--8--
include Java

require 'rubygems'
require 'active_support'

frame = javax.swing.JFrame.new("Hello JRuby!")
frame.setSize(300, 300)

string = ActiveSupport::Base64.encode64("Hello JRuby!")
label = javax.swing.JLabel.new(string, javax.swing.JLabel::CENTER)

frame.getContentPane().add(label)

frame.setVisible(true)
--8--

I pack it in a JAR:
java -jar jruby-complete-1.5.0.dev.jar -S jrubyc gui.rb
jar cf gui.jar gui.class

I pack the required gem:
java -jar jruby-complete-1.5.0.dev.jar -S gem install -i ./gems activesupport 
--no-rdoc --no-ri
jar cf gems.jar -C gems .

Then I sign the three JARs (gui, gems and jruby-complete-1.5.0.dev) with 
keytool.

This is my gui.JNLP file (Java Web Start)

--8--
<?xml version="1.0" encoding="utf-8"?> 
<jnlp 
  spec="1.0+" 
  codebase="file:/Users/gonzalo/Stuff/Programming/JRuby/" 
  href="gui.jnlp"> 
  <information> 
    <title>JRuby Simple GUI</title> 
    <vendor>Gonzalo Suárez</vendor> 
  </information> 
  <security> 
      <all-permissions/> 
  </security> 
  <resources> 
    <j2se version="1.6+"/> 
    <jar href="gui.jar"/> 
    <jar href="gems.jar"/> 
    <jar href="jruby-complete-1.5.0.dev.jar"/> 
    <property name="jruby.native.enabled" value="false"/>
  </resources> 
  <application-desc main-class="gui"/> 
</jnlp>
--8--

Now I start the Java Web Start:
javaws gui.jnlp

Everything works fine. I tested this on Mac OS X 10.5.8 and Windows 7.

I uploaded everything to my amazon S3 bucket. 
http://liquidknife.s3.amazonaws.com/gui.jnlp
(I modified the gui.JNLP with the right codebase.)

I tested it again on my Mac and this is what the Java console shows:

--8--
Reading certificates from 1980 http://liquidknife.s3.amazonaws.com/gui.jar | 
/Users/gonzalo/Library/Caches/Java/cache/6.0/36/35db18e4-10124db6.idx
Reading certificates from 59044 http://liquidknife.s3.amazonaws.com/gems.jar | 
/Users/gonzalo/Library/Caches/Java/cache/6.0/58/2460defa-2e4b2e66.idx
Reading certificates from 728150 
http://liquidknife.s3.amazonaws.com/jruby-complete-1.5.0.dev.jar | 
/Users/gonzalo/Library/Caches/Java/cache/6.0/26/2f69169a-78866e0d.idx
#### Java Web Start Error:
#### no such file to load -- active_support
--8--

It seems that gems can't be located when the code is fetched from HTTP. Any 
ideas of what may be going on? Thanks for your help.

 



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to