Execution time and memory usage for Java and Scala seems too much

I resolved a simple problem with several different languages but with same algorithm, the execution time and memory usage is a surprise to me.

0.76 1399M JAVA
0.11 7.3M RUBY
0.00 2.6M C++ 4.3.2
2.32 373.1M SCALA

Why JAVA and SCALA use so much memory?
I think JAVA and SCALA should be faster than RUBY?

Also, I found the language time multiplier at Announcing Variable Time Limits Based on Programming Language
Why time multiplier for Scala is 1X, but Java is 2X, since Scala is a JVM based language it should as fast as Java in most cases.

I cannot tell you about the time factor but as far as the memory is concerned, each program is allotted a minimum specific memory beforehand by the online judge. If you use less memory than this, it will still show the memory allotted before and not that consumed by the actual code.It is by default around 1399 MB for Java in most cases and around 2.2 mb for C and 2.6 mb for C++ as far as i know.

//