Module Java
In: lib/buildr/java/jruby.rb  (CVS)
lib/buildr/java/rjb.rb  (CVS)
lib/buildr/java/commands.rb  (CVS)
lib/buildr/java/deprecated.rb  (CVS)

Base module for all things Java.

Methods

apt   classpath   classpath   home   java   javac   javadoc   load   load   version   wrapper  

Classes and Modules

Module Java::Commands
Class Java::JavaWrapper
Class Java::Options

Constants

JRUBY_MIN_VERSION = '1.5.1'   This version is the minimal version Buildr will support. Any older version of JRuby will raise an exception.

External Aliases

wrapper -> rjb

Public Class methods

Deprecated: Use Java::Commands.apt instead.

Returns the classpath, an array listing directories, JAR files and artifacts. Use when loading the extension to add any additional libraries used by that extension.

For example, Ant is loaded as follows:

  Java.classpath << 'org.apache.ant:ant:jar:1.7.0'

Returns the classpath, an array listing directories, JAR files and artifacts. Use when loading the extension to add any additional libraries used by that extension.

For example, Ant is loaded as follows:

  Java.classpath << 'org.apache.ant:ant:jar:1.7.0'

*Deprecated:* Use ENV[‘JAVA_HOME’] instead

Deprecated: Use Java::Commands.javac instead.

Deprecated: Use Java::Commands.javadoc instead.

Loads the JVM and all the libraries listed on the classpath. Call this method before accessing any Java class, but only call it from methods used in the build, giving the Buildfile a chance to load all extensions that append to the classpath and specify which remote repositories to use.

Loads the JVM and all the libraries listed on the classpath. Call this method before accessing any Java class, but only call it from methods used in the build, giving the Buildfile a chance to load all extensions that append to the classpath and specify which remote repositories to use.

*Deprecated:* Use ENV_JAVA instead.

*Deprecated:* In earlier versions, Java.wrapper served as a wrapper around RJB/JRuby. From this version forward, we apply with JRuby style for importing Java classes:

  Java.java.lang.String.new('hai!')

You still need to call Java.load before using any Java code: it resolves, downloads and installs various dependencies that are required on the classpath before calling any Java code (e.g. Ant and its tasks).

[Validate]