Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/svenfuchs/rjb-require
- Owner: svenfuchs
- Created: 2010-04-30T15:59:06.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2010-04-30T16:00:36.000Z (over 14 years ago)
- Last Synced: 2023-11-20T16:21:22.705Z (about 1 year ago)
- Language: Ruby
- Homepage:
- Size: 79.1 KB
- Stars: 4
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.textile
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)