Quantcast
Channel: jruby
Viewing all articles
Browse latest Browse all 10

A JRuby jar include tip

$
0
0

A JRuby jar include tip

Ever need to include a Java jar file in a JRuby script? As I work to convert my Mac speech recognition server to JRuby, the first task I need to tackle is to include the Sphinx-4 jar files in my JRuby path. You can include one Java jar file in your JRuby script path very easily, like this:

require 'lib/sphinx4.jar'

where the jar file 'sphinx4.jar' is in a local subdirectory named lib, which is cool. But if you need to include many Java jar files into your JRuby script at one time, here's a very cool way to do that:


Viewing all articles
Browse latest Browse all 10

Latest Images

Trending Articles





Latest Images