Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/svenfuchs/rjb-require

Adds the ability to import and map Java packages to nested Ruby modules/classes to RJB.
https://github.com/svenfuchs/rjb-require

Last synced: about 2 months ago
JSON representation

Adds the ability to import and map Java packages to nested Ruby modules/classes to RJB.

Awesome Lists containing this project

README

        

h1. Rjb.require

Adds the ability to import and map Java packages to nested Ruby modules/classes to RJB.

h2. Usage


require 'rjb/require'

# java.net.URL is already in your classpath
Rjb.require 'java.net.URL'
Java::Net::URL.new('http://github.com')

# load some custom library
Rjb.load_from 'path/to/htmlunit' # loads all jar files to Rjb
Rjb.require 'com.gargoylesoftware.htmlunit.WebClient'

h2. Authors

* Original Work: Richard L. Apodaca (see "Mapping Java Packages Onto Ruby Modules":http://depth-first.com/articles/2006/10/24/metaprogramming-with-ruby-mapping-java-packages-onto-ruby-modules)
* Modifications: Sven Fuchs (Ruby gem, RJB module level method, add RJB.load_from for convenience)