Calling JRuby in Java

We all know that JRuby can easily use Java classes, but did you know Java can call JRuby scripts? An excellent but relatively underutilized feature of Java and JRuby is the ability to call JRuby scripts directly from your Java program. Consider the possibilities of loading a JRuby script, from possible a text file or a database, and having it execute within your program. It could be an excellent method of installing on-the-fly system updates or modifying variables that you never thought you'd need to touch. Always, of course, be careful not to execute malicious code, as your JRuby script can do anything your Java code might.
Comments:

Post a Comment:
Comments are closed for this entry.
About

Ryan Kopf

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today