Java extension (JAR) not required if using an absolute path
-----------------------------------------------------------
Key: JRUBY-3286
URL: http://jira.codehaus.org/browse/JRUBY-3286
Project: JRuby
Issue Type: Bug
Components: Extensions, Java Integration
Affects Versions: JRuby 1.1.5
Environment: Mac OS X 10.5.5; SoyLatte 1.0.3 i386:
java version "1.6.0_03-p3"
Java(TM) SE Runtime Environment (build
1.6.0_03-p3-landonf_19_aug_2008_14_55-b00)
Java HotSpot(TM) Server VM (build 1.6.0_03-p3-landonf_19_aug_2008_14_55-b00,
mixed mode)
Reporter: Alex Coles
To reproduce:
* create a Java extension, with a class name of MyAppExtService, implementing
org.jruby.runtime.load.BasicLibraryService.
* compile and JAR the extension as my_app_ext.jar.
* copy the JAR into the same directory (such as "lib") as the my_app.rb file
that require it
* create a my_app.rb file with the line:
require 'my_app_ext'
* the extension should be required
* now change the line in my_app.rb to:
require File.expand_path(File.join(File.dirname(__FILE__), 'my_app_ext'))
Expected behavior:
* the extension should load
Actual behavior:
* the extension does not load
Example of this behavior:
This commit broke the loading of the Java extensions in the DataObjects project:
http://github.com/sam/do/commit/2b86f4a5d55205192175fe06eb93706fc876146a
This commit then returns to using relative paths so that the Java extension
will load:
http://github.com/sam/do/commit/f8f2083d652821ee39f06f63ab37c9b870da506
--
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