Rails/Java Integration and Hosting

At the moment I'm a sub-contractor, doing mostly .NET work, with some
Rails websites on the side just for fun. I'm considering applying for
a position at a software company that will be pretty Java intensive,
and I don't have much Java experience (a grand total of one
significant project I did a year ago just for fun). I know a
developer at the company, and he recommended I work up my java skills
before applying. I love developing software, so I definitely want to
do this, but the biggest issue is finding something interesting to
work on. My current idea is to build a fractal-music generating web
app based on an algorithm I developed back in college and originally
implemented in a desktop .NET app. I'd like to use java for a good
portion of it, but I'd rather not learn a new web app framework. I
really, really like Rails. So, if possible, most of the web app will
be in Rails, but all the midi manipulation will be done in Java. I've
got a few questions that I'm hoping someone on here can help me with:

1. Is there a simple way to call a Java app/function/whatever from
Rails?
2. The Rails hosts I've used before now (Rails Playground and A2
Hosting) don't provide support for Java. Anyone have any
recommendations for a good hosts that supports both Rails and Java?
3. Alternately, I would consider using Java for the whole project if
there is a Rails-like framework in Java that would allow me to re-use
a lot of my rails experience and getup to speed without too much
difficulty. I've been hearing about rails features being ported over
to PHP, ASP.NET, etc...is there a good rails-like Java framework to
use?

Thanks,
Myron

At the moment I'm a sub-contractor, doing mostly .NET work, with some
Rails websites on the side just for fun. I'm considering applying for
a position at a software company that will be pretty Java intensive,
and I don't have much Java experience (a grand total of one
significant project I did a year ago just for fun). I know a
developer at the company, and he recommended I work up my java skills
before applying. I love developing software, so I definitely want to
do this, but the biggest issue is finding something interesting to
work on. My current idea is to build a fractal-music generating web
app based on an algorithm I developed back in college and originally
implemented in a desktop .NET app. I'd like to use java for a good
portion of it, but I'd rather not learn a new web app framework. I
really, really like Rails. So, if possible, most of the web app will
be in Rails, but all the midi manipulation will be done in Java. I've
got a few questions that I'm hoping someone on here can help me with:

1. Is there a simple way to call a Java app/function/whatever from
Rails?
  

Yes, there is: JRuby is your answer, I write a ruby app that runs inside
JRuby, it works wery well (but for now I don't call any Java class
method...).

JRuby is ruby interpreter written in Java and u can use ruby classes
from Java and vice versa.

Now with 1.1 versione (1.1RC2 at this moment) the interpreter can
compile ruby class (ahead of time and just in time), very cool !!!

If you want to run ruby apps inside GlassFish V3 app server give a try
to glassfish gem (
http://rubyforge.org/frs/download.php/32339/glassfish-0.1.1-universal-java-1.5.gem
)

2. The Rails hosts I've used before now (Rails Playground and A2
Hosting) don't provide support for Java. Anyone have any
recommendations for a good hosts that supports both Rails and Java?
  

Sorry, I don't know...

3. Alternately, I would consider using Java for the whole project if
there is a Rails-like framework in Java that would allow me to re-use
a lot of my rails experience and getup to speed without too much
difficulty. I've been hearing about rails features being ported over
to PHP, ASP.NET, etc...is there a good rails-like Java framework to
use?
  

The only other project I know is Grails (Groovy based) but if you have
some Ruby/Rails experience the best choice is JRuby... (supported very
well by NetBeans IDE, my best IDE friend since 2001...)

Have a nice day...