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).
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
# File lib/buildr/java/deprecated.rb, line 34 def classpath=(paths) fail 'Deprecated: Append to Java.classpath, you cannot replace the classpath.' end
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
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
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