This project has retired. For details please refer to its Attic page.
class Java::JavaWrapper - buildr

class Java::JavaWrapper

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).

Public Instance Methods

classpath() click to toggle source

Deprecated: Append to Java.classpath directly.

# File lib/buildr/java/deprecated.rb, line 29
def classpath
  Buildr.application.deprecated 'Append to Java.classpath instead.'
  ::Java.classpath
end
classpath=(paths) click to toggle source
# File lib/buildr/java/deprecated.rb, line 34
def classpath=(paths)
  fail 'Deprecated: Append to Java.classpath, you cannot replace the classpath.'
end
import(class_name) click to toggle source

Deprecated: Use Java.pkg.pkg.ClassName to import a Java class.

# File lib/buildr/java/deprecated.rb, line 53
def import(class_name)
  Buildr.application.deprecated 'Use Java.pkg.pkg.ClassName to import a Java class.'
  ::Java.instance_eval(class_name)
end
load() click to toggle source

Deprecated: Use Java.load instead.

# File lib/buildr/java/deprecated.rb, line 45
def load
  Buildr.application.deprecated 'Use Java.load instead.'
  ::Java.load
end
onload()
Alias for: setup
setup() { |self| ... } click to toggle source

Deprecated: No longer necessary.

# File lib/buildr/java/deprecated.rb, line 39
def setup
  Buildr.application.deprecated 'See documentation for new way to access Java code.'
  yield self if block_given?
end
Also aliased as: onload