Questions tagged [jvm-languages]

Languages that compile their source code to the byte code of the java virtual machine are commonly called JVM languages. A common feature of those languages is that the Java APIs can be used more or less seamlessly.

The following list could be completed over time.

Important JVM languages:

  1. Java (object oriented)
  2. Scala (object oriented/functional)
  3. Clojure (Lisp-y)
  4. Groovy (OO scripting)

Implementations of popular languages for the JVM:

  1. Python
  2. Ruby

Recent/upcoming languages:

  1. Kotlin (object oriented, ...)
  2. Ceylon (object oriented, ...)
  3. Frege (pure functional, like Haskell 2010)
150 questions
5
votes
4 answers

RoR on GAE?

Since Google App Engine will soon full support Java: Would it be possible to run Ruby on Rails on Google App Engine? Or the limitations imposed by the AppEngine runtime will affect the JRuby implementation? What about other languages such as…
John
  • 234
  • 1
  • 4
5
votes
1 answer

When does running Jython on a .py file generate a .class file?

I just started playing with Jython, and sometimes running jython on a .py file generates a .class file, but this doesn't always happen. At first I thought the trigger was that you had to define a Python class inside the .py file, but evidently a…
espeed
  • 4,754
  • 2
  • 39
  • 51
5
votes
2 answers

Scala generics - why I can't create parametrised object inside generic class?

I'm currently learning scala. Why this code doesn't work: class GenClass[T](var d : T) { var elems: List[T] = Nil def dosom(x: T) = { var y = new T() y } } I get: error: class type required but T found in place of var y - new…
Robert Zaremba
  • 8,081
  • 7
  • 47
  • 78
5
votes
2 answers

A clean way to copy directory contents between different file systems?

I want to copy files from one java.nio.file.FileSystem to another one. For example, from default file system to com.google.common.jimfs.Jimfs.
Konrad Jamrozik
  • 3,254
  • 5
  • 29
  • 59
5
votes
1 answer

Is there a clean way to use Groovy's extension methods in Kotlin?

For example, Groovy allows to get text of a file represented by java.nio.file.Path as follows: // Groovy code import java.nio.file.Path import java.nio.file.Paths Path p = Paths.get("data.txt") String text = p.text I would like to be able to reuse…
Konrad Jamrozik
  • 3,254
  • 5
  • 29
  • 59
5
votes
3 answers

who is the owner of JVM?

Lot of Mobile devices are coming with JVM with its OS(for example Nokia,sony ericcson).will all devices have same JVM? are all JVMs owned by sun micro systems? has device manufacturer paid for it to sun micro sytems? suppose If i want to creat my…
user141302
5
votes
2 answers

Why not Rhino for JVM apps?

I would like to develop some apps for the JVM using a concise, dynamic language. The most popular choices for this seem to be Jython, JRuby, Groovy, and maybe Clojure. Rhino appears to be fast and very stable, but I see no books on Rhino development…
user287424
  • 1,219
  • 12
  • 22
5
votes
3 answers

J2ME development without Java?

I'm making my first foray into the J2ME world. I'd prefer to use a functional language to do the development. Scala used to have CLDC support, but it's no longer maintained. Bigloo seems to have disappeared. Interpreters (such as Jython) are a…
5
votes
5 answers

Generating .class file for JVM

I am working on a project that requires me to generate a java ".class" file on the go that can be later on compiled on the JVM. After learning and working with MSIL (Microsoft IL) which is also a stack based intermediate programming language, the…
Raghav Bali
  • 81
  • 2
  • 2
  • 9
5
votes
1 answer

Starting points to morph regular Servlets coding to my DSL

Clojure offers a good Java interop. However, I really want to have this: (servlet IndexServlet (service[parmas] ....) (do-post[params] ....) (do-get [params] ....)) (servlet-filter SecurityFilter (do-filter [params] ....)) I guess that is…
Chiron
  • 20,081
  • 17
  • 81
  • 133
4
votes
3 answers

UI design alternatives with Groovy/JRuby/Jython or other JVM languages?

For a developer in the Java eco-system, there is a handful of choices when it comes to UI design. The best known are: Swing (preferred when used with Netbeans and its GUI builder) Eclipse's SWT (mostly preferred for Eclipse plug-ins) Now, are…
Leonel
  • 28,541
  • 26
  • 76
  • 103
4
votes
2 answers

How do make the JVM recognize a scala.Array[T] as a java array T[] in a polymorphic method call?

The problem can be found in the following code: def debug[T](format: String, arg1:T, arg2:Any, args:Any*):T = { logger.debug(format, (arg1 :: arg2 :: args.toList).toArray) arg1 } Since what I pass as the second parameter…
4
votes
3 answers

Groovy is performing differently than Java In this code

I had a look at this question here. The problem with this question is this line: Integer i3 = (Integer) -128; /*** Doesn't compile ***/ As some of the answer's say's: The compiler interprets the - as the two-arg minus operator, i.e. it's trying to…
Ant's
  • 13,545
  • 27
  • 98
  • 148
4
votes
1 answer

XML parsing with Scala: Equivalent to "getElementByTagName(name)" in JS

XML parsing in Scala doesn't seem to be as easy and straightforward as it should be. What I needed was something that behaved similar to document.getElementsByTagName(name) in JavaScript, but for my purposes all I needed was the first element of a…
Jay Taylor
  • 13,185
  • 11
  • 60
  • 85
4
votes
5 answers

Can Jython replace Java?

So many server side and the mobile Java applications use the native Java language for Java. Can we use Jython instead to build the enterprise applications, e.g. websites, application servers etc. Also what do you feel about Java ME applications in…
Xolve
  • 22,298
  • 21
  • 77
  • 125