Calling a Java program in Ruby and getting output

I want my Rails application to invoke a Java program to do some laborious work. What is the best way to get out of a Java program in Ruby? The output text is about 60,000 characters for each request.

Is there a better way than writing / reading from text files?

I do not want to use JRuby.

+3
source share
2 answers
output = %x{java your_program.java}
+2
source

. , , RabbitMQ.

script, ruby ​​IO.popen, .

+1

All Articles