14
15
16
17
18
19
20
21
22
23
|
# File 'lib/jdtc.rb', line 14
def jdtc(args = [])
java_call = "java"
if (!java_home)
warn 'JAVA_HOME not set, defaulting on the java executable in the path if there is one.'
else
java_call = "$JAVA_HOME/bin/java"
end
puts "#{java_call} -classpath #{ecj_location} org.eclipse.jdt.internal.compiler.batch.Main #{args.join(" ")}"
system("#{java_call} -classpath #{ecj_location} org.eclipse.jdt.internal.compiler.batch.Main #{args.join(" ")}") or fail "Compilation failed"
end
|